Public bug reported:

Using libc6_2.13-24ubuntu2_amd64.deb with
libc6-dbg_2.13-24ubuntu2_amd64.deb,

gdb -q /bin/date
Reading symbols from /bin/date...done.

(gdb) set stop-on-solib-events 1
(gdb) run
Starting program: /bin/date 
Stopped due to shared library event
(gdb) bt
#0  0x00007ffff7deb300 in _dl_debug_state () from /lib64/ld-linux-x86-64.so.2
#1  0x00007ffff7ddf386 in ?? () from /lib64/ld-linux-x86-64.so.2
#2  0x00007ffff7df1014 in ?? () from /lib64/ld-linux-x86-64.so.2
#3  0x00007ffff7de118f in ?? () from /lib64/ld-linux-x86-64.so.2
#4  0x00007ffff7ddd5b8 in ?? () from /lib64/ld-linux-x86-64.so.2
#5  0x0000000000000001 in ?? ()
#6  0x00007fffffffe7bc in ?? ()
#7  0x0000000000000000 in ?? ()
(gdb) quit

Note lack of debug symbols for /lib64/ld-linux-x86-64.so.2

The problem is that /lib64/ld-linux-x86-64.so.2 has .gnu_debuglink of
"ld-2.13.so".

This means that GDB will look for /usr/lib/debug/lib64/ld-2.13.so (not present)
and will not look for /usr/lib/debug/lib/x86_64-linux-gnu/ld-2.13.so (which is 
present).

strace confirms that:

grep 'ld-2.13.so"' /tmp/strace.out 
open("/lib64/ld-2.13.so", O_RDONLY)     = -1 ENOENT (No such file or directory)
open("/lib64/.debug/ld-2.13.so", O_RDONLY) = -1 ENOENT (No such file or 
directory)
open("/usr/lib/debug//lib64/ld-2.13.so", O_RDONLY) = -1 ENOENT (No such file or 
directory)
open("/usr/lib/debug/lib64/ld-2.13.so", O_RDONLY) = -1 ENOENT (No such file or 
directory)
readlink("/lib64/ld-linux-x86-64.so.2", "/lib/x86_64-linux-gnu/ld-2.13.so"..., 
4095) = 32
lstat("/lib/x86_64-linux-gnu/ld-2.13.so", {st_mode=S_IFREG|0755, 
st_size=141088, ...}) = 0


Arguably, GDB should do readlink("/lib64/ld-linux-x86-64.so.2"), and look for
the real path name as well. If GDB did that, it would have worked.

But for now, libc6-dbg should probably provide a symlink from
/usr/lib/debug/lib64/ld-2.13.so to 
/usr/lib/debug/lib/x86_64-linux-gnu/ld-2.13.so

** Affects: eglibc (Ubuntu)
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/914448

Title:
  libc6-dbg puts ld-2.X.so into wrong location

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/eglibc/+bug/914448/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to