FS#73792 - [glibc] Enable debug symbols such that it works with debuginfod
Attached to Project:
Arch Linux
Opened by Arvid Norlander (VorpalGun) - Monday, 14 February 2022, 22:28 GMT
Last edited by freswa (frederik) - Friday, 13 May 2022, 15:55 GMT
Opened by Arvid Norlander (VorpalGun) - Monday, 14 February 2022, 22:28 GMT
Last edited by freswa (frederik) - Friday, 13 May 2022, 15:55 GMT
|
Details
Description:
This may be something that is already being worked on, and if so I apologise. I know the toolchain has been in a bit of a complicated state recently. Currently, there doesn't seem to be debug symbols for glibc. This may be related to the special handling of stripping in the PKGBUILD. As glibc (and other parts of the toolchain) are core components that are likely to end up in many different binaries, it would be advantageous to have debug symbols available. Additional info: * package version(s): glibc 2.35-2 * config and/or log files etc. N/A * link to upstream bug report, if any N/A Steps to reproduce: 1. Set up debuginfod. (See https://wiki.archlinux.org/title/Debuginfod for details) 2. Test it using for example: gdb /bin/bash 3. break main 4. info sharedlibrary Note output shows: From To Syms Read Shared Object Library 0x00007ffff7fc8000 0x00007ffff7fee535 Yes (*) /lib64/ld-linux-x86-64.so.2 0x00007ffff7f4e020 0x00007ffff7f78d68 Yes /usr/lib/libreadline.so.8 0x00007ffff7f33020 0x00007ffff7f330f5 Yes (*) /usr/lib/libdl.so.2 0x00007ffff7d54440 0x00007ffff7ec869d Yes (*) /usr/lib/libc.so.6 0x00007ffff7cca020 0x00007ffff7d0add0 Yes /usr/lib/libncursesw.so.6 (*): Shared library is missing debugging information. Here we can see that full debug symbols are available for readline and ncurses, but only symbol tables from glibc (libc, libdl, ld-linux-x86-64). |
This task depends upon
Closed by freswa (frederik)
Friday, 13 May 2022, 15:55 GMT
Reason for closing: Implemented
Additional comments about closing: glibc-2.35-5 in [testing]
Friday, 13 May 2022, 15:55 GMT
Reason for closing: Implemented
Additional comments about closing: glibc-2.35-5 in [testing]
edit: s/vagrant/valgrind
valgrind?
On a related note, the current PKGBUILD is buggy WRT to stripping due to the .so name changes introduced in glibc-2.34
"Previously, glibc installed its various shared objects under versioned
file names such as libc-2.33.so. The ABI sonames (e.g., libc.so.6)
were provided as symbolic links. Starting with glibc 2.34, the shared
objects are installed under their ABI sonames directly, without
symbolic links."
Patch attached. I believe it to be correct but please sanity check it.
$ file /lib/x86_64-linux-gnu/ld-2.31.so /lib/x86_64-linux-gnu/libc-2.31.so
/lib/x86_64-linux-gnu/ld-2.31.so: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, BuildID[sha1]=ea85fcb25ee4c4c9e7b180924ab4a44257a9547a, stripped
/lib/x86_64-linux-gnu/libc-2.31.so: ELF 64-bit LSB shared object, x86-64, version 1 (GNU/Linux), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, BuildID[sha1]=ce782ece08d088e77eeadc086f84d4888de4bb42, for GNU/Linux 3.2.0, stripped
$ nm /lib/x86_64-linux-gnu/libc-2.31.so /lib/x86_64-linux-gnu/ld-2.31.so
/lib/x86_64-linux-gnu/libc-2.31.so:
nm: /lib/x86_64-linux-gnu/libc-2.31.so: no symbols
/lib/x86_64-linux-gnu/ld-2.31.so:
nm: /lib/x86_64-linux-gnu/ld-2.31.so: no symbols
If it is waiting on being able to get debug packages onto the build servers I guess not, but is there a separate bug for that issue then?