If you get an error such as this:
/usr/bin/ld: errno: TLS definition in /lib/libc.so.6 section .tbss mismatches
non-TLS reference in [...]
What you need to do is this: open the appropriate makefile (i.e. in
TKIGES), find the line DEFAULT_INCLUDES, and add -include
/usr/include/errno.h to the end.
This applies to gcc-3.3.6, at least.
在CFLAGS后边加-include
/usr/include/errno.h也可以。
另外在在lib.svr4目录中报错的strerror.c中
注释掉
//extern char *sys_errlist[];
//extern int sys_nerr;
这两句就行了,因为这两句已经在errno.h中定义了
本文解决了一个特定的链接错误,该错误涉及到libc.so.6中的TLS定义与非TLS引用不匹配的问题。解决方案包括修改makefile文件,在CFLAGS后添加特定选项,并调整strerror.c文件中的代码。

被折叠的 条评论
为什么被折叠?



