[PATCH] elf: Dump SHT_RELR relocations for objdump -R

Nick Clifton nickc@redhat.com
Tue Feb 25 09:24:32 GMT 2025


Hi H.J.

> Update _bfd_elf_get_dynamic_reloc_upper_bound to count SHT_RELR
> relocations and update _bfd_elf_canonicalize_dynamic_reloc to slurp
> them. The backend only needs to define elf_dt_relr_reloc_howto for the
> pointer to reloc_howto_type for SHT_RELR relocation type which typically
> is R_*_RELATIVE.

I prefer the current solution - having objdump tell users to use readelf
if they want to see RELR relocation dumps - on the grounds that it keeps
things (slightly) simpler.  Adding code to the BFD library is adding the
potential for more bugs, and if readelf can already do the job then why
not just leave it at that ?

Cheers
   Nick



More information about the Binutils mailing list