[RFC 1/4] gas: ld: sframe: fix RELA r_offset handling

Indu Bhagat indu.bhagat@oracle.com
Thu Mar 20 15:54:55 GMT 2025
On 3/13/25 7:04 AM, Jan Beulich wrote:
> On 08.03.2025 08:38, Indu Bhagat wrote:
>> In SFrame V2, SFrame function descriptor entry is a 32-bit signed
>> integer (sfde_func_start_address) which is meant to indicate the start
>> PC of the function.  According to the specification, it intends to hold
>> the offset of the start PC of the function from the
>> _start_of_the_SFrame_section_.
> 
> Which isn't something that can normally be expressed by relocations. Hence
> is it maybe the spec which is flawed? As mentioned elsewhere, relocations
> should retain their normal meaning. Custom adjustments based on it being
> .sframe sections that are being processed feels wrong. Unaware tools ought
> to be able to deal with this just fine.
> 

Re: change the spec, this issue needs to be fixed for SFrame V2, and the 
fix backported.

Given the way SFrame sections are by design, unaware tools linking 
SFrame sections will not dump out valid output SFrame section.

> There also looks to be a number of unrelated changes in this patch.
> Without there being anything said about those they look as if they're
> there by mistake.
> 

There are two set of changes in this patch, which need to go hand in 
hand (i.e., in the same patch I am afraid): gas emits a different RELA 
and ld does not do any fixup as it was doing earlier.  I cant seem to 
find which of the stub seems unrelated.  Can you point them to me ?

Thanks



More information about the Binutils mailing list