[RFC 4/4] ld: bfd: sframe: fix incorrect r_addend in RELA entries

Jan Beulich jbeulich@suse.com
Tue Mar 25 07:24:50 GMT 2025


On 24.03.2025 20:54, Indu Bhagat wrote:
> On 3/24/25 9:08 AM, Michael Matz wrote:
>> Yes, a separate ELF section type would have been definitely proper here
>> :-/
>>
> 
> What would such a ELF section type want to indicate?  That this is a say 
> SHT_SFRAME ?  I am thinking anything more generic to accommodate (in 
> hindsight), say .eh_frame , or .ctf (or .BTF and more in future), in one 
> section flag will not work, as the merging semantics for each of these 
> sections are quite different:
> 
>    - .eh_frame uses relocations (PC-rel)
>    - .ctf does not use relocations but the types are de-duplicated when 
> merging.
>    - .BTF, IIUC, will need some relocations.  And similar to .ctf, there 
> will be de-duplication too.

At least .eh_frame should also have had its own SHT_*, imo. Yet that's
clearly too late now. Plus the gABI was in nearly unmaintained state for
far too long. Whether the same goes for .ctf and .btf I don't know, as I
know too little about those features.

Jan


More information about the Binutils mailing list