Control: reassign -1 glibc 2.42-7 Control: retitle -1 Please ship an unstripped ld.so (so GDB can work on armhf)
[ Sorry, properly reassigning now ]
On Sunday, 18 January 2026, Sergio Durigan Junior wrote:
> On Saturday, January 17 2026, David Bremner wrote:
>
>> On amdahl,
>>
>> $ cat <<EOF > hello.c
>> #include <stdio.h>
>> int main(int argc, char **argv){
>> printf("hello world\n");
>> }
>> EOF
>>
>> $ gdb ./a.out
>> Reading symbols from ./a.out...
>> (No debugging symbols found in ./a.out)
>> (gdb) run
>> Starting program: /home/bremner/notmuch-0.39/a.out
>>
>> Program received signal SIGSEGV, Segmentation fault.
>> 0xf7fc682a in ?? () from /lib/ld-linux-armhf.so.3
>> (gdb)
>>
>> I tried 4 executables: /usr/bin/ls, notmuch (compiled from 0.39 and
>> 0.40~rc1 source, and hello world). It seems to me that gdb us
>> currently unusable on armhf, hence the severity. As always feel free
>> to choose a more appropriate severity if I missed something.
>
> Thanks for the bug report.
>
> I can confirm the problem. This has actually happened before in Ubuntu:
>
> https://bugs.launchpad.net/ubuntu/+source/gdb/+bug/1927192
>
> The issue occurs because of an unfortunate combination of how GDB
> detects shared library loading (via stap probes on ld.so) and how GDB
> tries to detect thumb vs. arm modes. In a nutshell:
>
> - GDB uses SystemTap SDT probes to insert breaking in specific places
> inside ld.so.
>
> - These probes reside in a note section inside the ld.so ELF file. GDB
> doesn't need symbols to place the breakpoints, *however*
>
> - GDB needs ELF symbols in ld.so in order to determine arm vs. thumb
> mode.
>
> - Because we ship a stripped ld.so in Debian, GDB can't make a decision
> and defaults to arm mode, which is wrong in this case and causes the
> segfault.
>
> The quick workaround here is to install libc6-dbg. This allows GDB to
> properly determine the correct mode and adjust the breakpoint on the
> inferior accordingly.
>
> This problem is not manifesting on Trixie and earlier releases because
> glibc wasn't being built with SystemTap SDT probe support until a few
> weeks ago:
>
> https://salsa.debian.org/glibc-team/glibc/-/commit/64d98cedf15c4e1af56855dd0c97c8cf10612920
>
> This means that glibc doesn't have the .note.stapsdt section embedded in
> its ELF files, so GDB doesn't even attempt to use the stap probe
> mechanism.
>
> Therefore, I am reassigning this bug to glibc because I believe the
> correct fix is to ship an unstripped version of ld.so.
>
> Please let me know if you need more details and I'll be happy to provide
> them.
>
> Cheers,
>
> --
> Sergio
> GPG key ID: 237A 54B1 0287 28BF 00EF 31F4 D0EB 7628 65FC 5E36
> Please send encrypted e-mail if possible
> https://sergiodj.net/
--
Sergio
GPG key ID: 237A 54B1 0287 28BF 00EF 31F4 D0EB 7628 65FC 5E36
Please send encrypted e-mail if possible
https://sergiodj.net/
signature.asc
Description: PGP signature

