Comments (7)
你参考一下我们的示例项目里选项: https://github.com/OpenXiangShan/CPU2006LiteWrapper/blob/33c53413dbfe604867e297201bfbb07f3abac005/Makefile.apps#L76
其中比较关键的是:
- 使用riscv64-unknown-linux-gnu工具链
- 静态链接SPECCPU:-static
你说的 “编译出来的可执行文件大小跟正确的相比都小很多”,那是因为你没有静态链接
已解决
是通过静态编译解决了吗?你的答案对社区很重要 :)
已解决 以下是我的spec编译配置文件修改
COPTIMIZE = -O2 -fno-strict-aliasing -static
CXXOPTIMIZE = -O2 -fno-strict-aliasing -static
FOPTIMIZE = -O2 -fno-strict-aliasing -static
from nemu.
我生成的可执行文件是这两个,我都试了 都不太行
还有就是我的可执行文件比正确的aster可执行文件貌似小很多,所以确实不知道哪一步错了
from nemu.
额,你用的是unknown-elf-gcc,
你可以看看我们这个项目的readme,我们给出的编译speccpu06示例的时候用的是riscv64-unknown-linux-gnu-:
https://github.com/OpenXiangShan/CPU2006LiteWrapper
unknown-elf-gcc和unknown-linux-gnu的区别可以参考toolchain的readme:
https://github.com/riscv-collab/riscv-gnu-toolchain/blob/master/README.md
一个可能不太准确的概括:你的SPECCPU是在Linux环境下运行的,你应该用riscv64-unknown-linux-gnu前缀的工具链。
from nemu.
from nemu.
你参考一下我们的示例项目里选项:
https://github.com/OpenXiangShan/CPU2006LiteWrapper/blob/33c53413dbfe604867e297201bfbb07f3abac005/Makefile.apps#L76
其中比较关键的是:
- 使用riscv64-unknown-linux-gnu工具链
- 静态链接SPECCPU:-static
你说的 “编译出来的可执行文件大小跟正确的相比都小很多”,那是因为你没有静态链接
from nemu.
你参考一下我们的示例项目里选项: https://github.com/OpenXiangShan/CPU2006LiteWrapper/blob/33c53413dbfe604867e297201bfbb07f3abac005/Makefile.apps#L76
其中比较关键的是:
- 使用riscv64-unknown-linux-gnu工具链
- 静态链接SPECCPU:-static
你说的 “编译出来的可执行文件大小跟正确的相比都小很多”,那是因为你没有静态链接
已解决
from nemu.
你参考一下我们的示例项目里选项: https://github.com/OpenXiangShan/CPU2006LiteWrapper/blob/33c53413dbfe604867e297201bfbb07f3abac005/Makefile.apps#L76
其中比较关键的是:
- 使用riscv64-unknown-linux-gnu工具链
- 静态链接SPECCPU:-static
你说的 “编译出来的可执行文件大小跟正确的相比都小很多”,那是因为你没有静态链接
已解决
是通过静态编译解决了吗?你的答案对社区很重要 :)
from nemu.
Related Issues (20)
- 编译riscv64-nemu-interpreter支持pie问题 HOT 4
- Potential memory access out of bound problem when printing $ISA-manual logo HOT 3
- 关于生成的checkpoint文件的一些疑惑
- 生成riscv32指令集时出现的错误 HOT 4
- NEMU could not trap at misaligned memory access when running standalone HOT 1
- 关于根据cpu.pc取指疑问 HOT 5
- NUME仿真精度疑问 HOT 1
- 关于checkpoint的预热指令疑问
- 关于Xiangshan中实现的0x9c0地址的Sdsid自定义读写寄存器,目前NEMU中好像没有相关实现 HOT 1
- 对于vsstatus寄存器,在执行完浮点指令需要修改fs位域时(dirty_fs),NEMU中没有做对应修改 HOT 6
- 关于NEMU中对于C.EBREAK指令的处理 HOT 3
- 0x5C5-0x5E5在香山中为cache instruction register,这部分好像NEMU中没有对应实现? HOT 1
- 请教关于多核NEMU问题 HOT 1
- 请教NEMU中关于PMA地址寄存器初始值以及内存地址划分问题 HOT 1
- After Excuting WFI, SPIKE and NEMU Lose Synchronization HOT 6
- 当前NEMU中对异常V扩展指令的覆盖存在部分缺陷 HOT 2
- Compilation Failure When Enabling FPU_HOST
- NEMU Crashes When Enabling AC_HOST
- Compilation Failure When Using clang and Enabling RVB & PERF_OPT
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nemu.