|
楼主 |
发表于 2005-12-1 09:57:29
|
显示全部楼层
找到了解决的方法,但是还没有尝试。现在正在安装redhat 9,如果解决了,再给出具体操作。
这是找到的解决办法,英文的,大家参考一下吧。
The GLIBC_2.0 *is* the latest (and the only) version of that symbol.
The problem is that this symbol is hidden:
$ objdump -T /lib/tls/libc.so.6 | grep __ctype_b
00021c80 g DF .text 00000072 GLIBC_2.3 __ctype_b_loc
00119538 g DO .data 00000004 (GLIBC_2.0) __ctype_b
The parenthesis around GLIBC_2.0 mean the symbol is hidden, and
can only be used by runtime loader, but not by the linker.
There are multiple ways to achieve that. The simplest is to rebuild
RH-9 glibc from SRPM. Once you've built it (don't install, just
do "rpmbuild -bc glibc.spec"), edit locale/lc-ctype.c, replace:
compat_symbol (libc, __ctype_b, __ctype_b, GLIBC_2_0);
with:
versioned_symbol (libc, __ctype_b, __ctype_b, GLIBC_2_0);
and rebuild it again. The change above should "un-hide" __ctype_b
(the parenthesis around GLIBC_2.0 should disappear).
Now you should be able to relink your exe:
echo "GROUP (/usr/src/redhat/BUILD/glibc-.../libc.so.6 /usr/lib/libc_nonshared.a )" > libc.so
gcc -o MyExe ... -L. # (will use ./libc.so)
The resulting MyExe will work with the libc.so.6 already installed,
since __ctype_b in it is available for runtime loader. |
|