Bug 28758 - GDB 11 doesn't work correctly on binaries with a SHT_RELR (.relr.dyn) section
Summary: GDB 11 doesn't work correctly on binaries with a SHT_RELR (.relr.dyn) section
Status: RESOLVED FIXED
Alias: None
Product: gdb
Classification: Unclassified
Component: gdb (show other bugs)
Version: 11.2
: P2 normal
Target Milestone: 11.2
Assignee: Not yet assigned to anyone
URL:
Keywords:
: 28785 (view as bug list)
Depends on:
Blocks:
 
Reported: 2022-01-09 17:34 UTC by H.J. Lu
Modified: 2022-01-16 13:29 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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. ***