vxworks编译成功但“ld”命令失败

时间:2013-04-07 06:13:29

标签: compilation vxworks

我使用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).

1 个答案:

答案 0 :(得分:3)

您会收到这些错误,因为无法在系统符号表中解析上述符号。

从VxWorks内核程序员指南6.8,ch。 16.3.7(加载问题非常有用的章节)

  

系统符号表用于存储系统中已安装的函数和变量的名称和地址。这有副作用,一旦符号安装在   系统符号表,它们可用于将来通过任何模块进行链接   加载。此外,在尝试解析模块中的未定义符号时,   加载器使用编译到目标图像中的所有全局符号,以及所有符号   先前加载的模块的全局符号。

提示:

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

[...]模块之间的依赖关系必须在考虑时考虑   加载模块以确保可以为每个新模块解析引用,   使用编译到VxWorks映像中的代码或已经存在的模块   已加载到系统中。   如果不这样做会导致代码不完全解决[...]

  • “lkup”命令可用于查找先前已加载的符号
相关问题