gpt4 book ai didi

compilation - vxworks 编译成功但 "ld"命令失败

转载 作者:行者123 更新时间:2023-12-04 02:12:30 26 4
gpt4 key购买 nike

我使用 IDE WindRiver Workbench 来编译 DKM 项目!它编译成功。但是“ld”命令失败了,如下所示:

Warning: module 0x1e2f0b8 holds reference to undefined symbol __GOTT_BASE__.
Warning: module 0x1e2f0b8 holds reference to undefined symbol __GOTT_INDEX__.
Warning: module 0x1e2f0b8 holds reference to undefined symbol _Assert.
Warning: module 0x1e2f0b8 holds reference to undefined symbol _Stoul.
Warning: module 0x1e2f0b8 holds reference to undefined symbol _Getpctype.
Warning: module 0x1e2f0b8 holds reference to undefined symbol _Stderr.
Warning: module 0x1e2f0b8 holds reference to undefined symbol _Getptoupper.
Warning: module 0x1e2f0b8 holds reference to undefined symbol _Getptolower.
Warning: module 0x1e2f0b8 holds reference to undefined symbol _Stod.
Warning: module 0x1e2f0b8 holds reference to undefined symbol _Flt.
Warning: module 0x1e2f0b8 holds reference to undefined symbol _Stdout.
ld(): error loading file (errno = 0xe0005).

最佳答案

你得到这些错误是因为提到的符号无法在系统符号表中解析。

来自 VxWorks 内核程序员指南 6.8,ch。 16.3.7(加载问题很有用的一章)

The system symbol table is used to store the names and addresses of functions and variables already installed in the system. This has the side effect that once symbols are installed in the system symbol table, they are available for future linking by any module that is loaded. Moreover, when attempting to resolve undefined symbols in a module, the loader uses all global symbols compiled into the target image, as well as all global symbols of previously loaded modules.

提示:

  • 检查您加载模块的顺序是否正确。如果您随后在另一个 DKM 中加载符号,则在该 DKM 上加载将失败。

[...] dependencies between modules must be taken into account when modules are loaded to ensure that references can be resolved for each new module, using either code compiled into the VxWorks image or modules that have already been loaded into the system. Failure to do so results in incompletely resolved code [...]

  • “lkup”命令可用于查找之前加载的符号

关于compilation - vxworks 编译成功但 "ld"命令失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15859502/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com