This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
--as-needed handling of shared libraries that fail -Wl,-z,defs
- From: Jakub Jelinek <jakub at redhat dot com>
- To: binutils at sources dot redhat dot com
- Date: Thu, 19 May 2005 18:37:16 +0200
- Subject: --as-needed handling of shared libraries that fail -Wl,-z,defs
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
Hi!
--as-needed doesn't seem to try satisfy undefined references in shared
libraries:
ldd -d -r /usr/lib64/libreadline.so.4
undefined symbol: BC (/usr/lib64/libreadline.so.4)
undefined symbol: PC (/usr/lib64/libreadline.so.4)
undefined symbol: UP (/usr/lib64/libreadline.so.4)
undefined symbol: tgetnum (/usr/lib64/libreadline.so.4)
undefined symbol: tgoto (/usr/lib64/libreadline.so.4)
undefined symbol: tgetflag (/usr/lib64/libreadline.so.4)
undefined symbol: tputs (/usr/lib64/libreadline.so.4)
undefined symbol: tgetent (/usr/lib64/libreadline.so.4)
undefined symbol: tgetstr (/usr/lib64/libreadline.so.4)
libc.so.6 => /lib64/libc.so.6 (0x0000003a33900000)
/lib64/ld-linux-x86-64.so.2 (0x0000555555555000)
echo 'int main (void) { return 0; }' | gcc -xc - -o test -lreadline -Wl,--as-needed -ltermcap -Wl,--no-as-needed; ./test
./test: symbol lookup error: /usr/lib64/libreadline.so.4: undefined symbol: BC
Is this desirable or should we change --as-needed to attempt to satisfy even
those? Particularly for -lreadline, it makes sense to not depend on
libtermcap resp. libncurses, as those symbols can be provided by either
of those libraries and some applications prefer one over the other and vice
versa.
Jakub