[PATCH 2/2] readelf: Use section names for displaying RELR relocs

Nick Clifton nickc@redhat.com
Wed May 29 09:56:08 GMT 2024


Hi Szabolcs,

> In some cases using section names instead of symbol names for
> displaying an address is more useful.
> 
> If the symbol falls outside the section where the address is
> then likely it is not useful to display the address relative to.
> 
> And if symbols are stripped from a binary then printing the
> section that contains the address is more useful than printing
> <no sym>.

That makes sense.  I just have one question:

> +      /* Only display section names that follow the '.' convention.  */
> +      && section_name (filedata, sec)[0] == '.')

Why have this restriction ?  What is wrong with section names that
do not follow the convention ?

Cheers
   Nick



More information about the Binutils mailing list