Package: binutils
Version: 2.21.51.20110421-3

This seems to be an older problem, but due to other
changes this bug means --no-allow-shlib-undefined
is now almost completely useless:

ld -shared -o test.so --no-allow-shlib-undefined -lc

fails with returns:

/lib/libc.so.6: undefined reference to `_dl_argv@GLIBC_PRIVATE'
/lib/libc.so.6: undefined reference to `_rtld_global_ro@GLIBC_PRIVATE'
/lib/libc.so.6: undefined reference to `__tls_get_addr@GLIBC_2.3'
/lib/libc.so.6: undefined reference to `_rtld_global@GLIBC_PRIVATE'
/lib/libc.so.6: undefined reference to `__libc_enable_secure@GLIBC_PRIVATE'

i.e. ld complains about undefined symbols in libraries linked
in (but not the to be created library itself), which are found in
that library's dependencies.

$ readelf -s /usr/lib/libc_nonshared.a | grep _tls_get_addr | wc -l
0
$ readelf -s /lib/libc.so.6 | grep _tls_get_addr
4: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND __tls_get_addr@GLIBC_2.3 
(19)
$ readelf -d /lib/libc.so.6 | grep NEEDED
0x0000000000000001 (NEEDED)             Shared library: [ld-linux-x86-64.so.2]
$ readelf -s /lib/ld-linux-x86-64.so.2 | grep _tls_get_addr
20: 0000000000010e90    82 FUNC    GLOBAL DEFAULT   11 __tls_get_addr@@GLIBC_2.3

        Bernhard R. Link



-- 
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]

Reply via email to