Debian problem with ld-linux.so.2 --list
Scott Bambrough
scottb@netwinder.org
Fri Mar 24 05:59:00 GMT 2000
Ulrich Drepper wrote:
>
> I see no reason to change this. First, I have no idea why the ldd
> script is ot used. There is no reason for this. Second, the
> "standard way" is to use the environment variable
> LD_TRACE_LOADED_OBJECTS.
In this case I think it is irrelevant what the standard way is or whether the
ldd script was used. The dynamic linker provides an option --list and I think
its behaviour is inconsistent. My argument would run along these lines.
On my system I can generate the same information in three different ways:
[root@pauli /root]# ldd /usr/bin/telnet
libncurses.so.4 => /usr/lib/libncurses.so.4 (0x4001e000)
libc.so.6 => /lib/libc.so.6 (0x40066000)
/lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x40000000)
[root@pauli /root]# LD_TRACE_LOADED_OBJECTS=1 /usr/bin/telnet
libncurses.so.4 => /usr/lib/libncurses.so.4 (0x4001e000)
libc.so.6 => /lib/libc.so.6 (0x40066000)
/lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x40000000)
[root@pauli /root]# /lib/ld-linux.so.2 --list /usr/bin/telnet
libncurses.so.4 => /usr/lib/libncurses.so.4 (0x40006000)
libc.so.6 => /lib/libc.so.6 (0x4004e000)
/lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x2aaaa000)
If I move libncurses.so.4:
[root@pauli /root]# ldd /usr/bin/telnet
libncurses.so.4 => not found
libc.so.6 => /lib/libc.so.6 (0x4001e000)
/lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x40000000)
[root@pauli /root]# LD_TRACE_LOADED_OBJECTS=1 /usr/bin/telnet
libncurses.so.4 => not found
libc.so.6 => /lib/libc.so.6 (0x4001e000)
/lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x40000000)
[root@pauli /root]# /lib/ld-linux.so.2 --list /usr/bin/telnet
/usr/bin/telnet: error in loading shared libraries: libncurses.so.4: cannot
open shared object file: No such file or directory
These commands can all be used to get the same information. I find it
inconsistent that --list behave differently than the first two commands when it
can't find the library? What useful purpose can it serve?
Scott
--
Scott Bambrough - Software Engineer
REBEL.COM http://www.rebel.com
NetWinder http://www.netwinder.org
More information about the Libc-hacker
mailing list