This is the mail archive of the libc-hacker@sourceware.cygnus.com mailing list for the glibc project.

Note that libc-hacker is a closed list. You may look at the archives of this list, but subscription and posting are not open.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Debian problem with ld-linux.so.2 --list


The origin of this problem is from the Debian bug tracking system:

http://cgi.debian.org/cgi-bin/bugreport.cgi?bug=60869

I can reproduce it on my machine with the following command sequence:

# /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)
# mv /usr/lib/libncurses.so.4 /usr/lib/libncurses.so.4.xxx
# /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

I believe we should get output similar to this:

# 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)

Jim suggests the problem can be fixed in elf/rtld.c, line 780...
  _dl_map_object_deps (_dl_loaded, preloads, npreloads, mode == trace, 0);

... by changing it to pass the ?? flag on both list and trace...

  _dl_map_object_deps (_dl_loaded, preloads, npreloads, 
                       (mode == list || mode == trace), 0);

Scott

-- 
Scott Bambrough - Software Engineer
REBEL.COM    http://www.rebel.com
NetWinder    http://www.netwinder.org

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]