Bug 28758

Summary: GDB 11 doesn't work correctly on binaries with a SHT_RELR (.relr.dyn) section
Product: gdb Reporter: H.J. Lu <hjl.tools>
Component: gdbAssignee: Not yet assigned to anyone <unassigned>
Status: RESOLVED FIXED    
Severity: normal CC: brobecker
Priority: P2    
Version: 11.2   
Target Milestone: 11.2   
Host: Target:
Build: Last reconfirmed:
Project(s) to access: ssh public key:

Description H.J. Lu 2022-01-09 17:34:08 UTC
$ readelf -SW elf/ld.so | grep .relr.dyn
  [11] .relr.dyn         RELR            0000000000000d88 000d88 000030 08   A  0   0  8
$ ...
Response:  Temporary breakpoint 1 at 0x1189: file test-cond-printers.c, line 33.
Starting program: /export/build/gnu/tools-build/glibc-gitlab-test/build-x86_64-linux/nptl/test-cond-printers 
BFD: /export/build/gnu/tools-build/glibc-gitlab-test/build-x86_64-linux/elf/ld.so: unknown type [0x13] section `.relr.dyn'
warning: `/export/build/gnu/tools-build/glibc-gitlab-test/build-x86_64-linux/elf/ld.so': Shared library architecture unknown is not compatible with target architecture i386:x86-64.
warning: `/export/build/gnu/tools-build/glibc-gitlab-test/build-x86_64-linux/elf/ld.so': Shared library architecture unknown is not compatible with target architecture i386:x86-64.
Comment 1 H.J. Lu 2022-01-09 17:46:24 UTC
A patch set is posted at

https://sourceware.org/pipermail/gdb-patches/2022-January/184953.html
Comment 2 H.J. Lu 2022-01-10 13:11:40 UTC
Fixed for GDB 11.2 by

fb0b83d80d1 bfd_section_from_shdr: Support SHT_RELR sections
67609c9c701 readelf: Support SHT_RELR/DT_RELR for -r
1b244ed9d3f readelf: Support RELR in -S and -d and output
Comment 3 H.J. Lu 2022-01-16 13:29:50 UTC
*** Bug 28785 has been marked as a duplicate of this bug. ***