[PATCH 3/3] ld: Cleanup sframe_decoder_init_func_bfdinfo use of cookie->rel
Jens Remus
jremus@linux.ibm.com
Mon Feb 24 15:59:05 GMT 2025
On 24.02.2025 10:49, Jan Beulich wrote:
> On 21.02.2025 17:56, Jens Remus wrote:
>> --- a/bfd/elf-sframe.c
>> +++ b/bfd/elf-sframe.c
>> @@ -118,9 +118,9 @@ sframe_decoder_init_func_bfdinfo (bfd *abfd,
>> if ((sec->flags & SEC_LINKER_CREATED) && cookie->rels == NULL)
>> return true;
>>
>> + cookie->rel = cookie->rels;
>> for (i = 0; i < fde_count; i++)
>> {
>> - cookie->rel = cookie->rels + i;
>> BFD_ASSERT (cookie->rel < cookie->relend);
>> /* Bookkeep the relocation offset and relocation index of each function
>> for later use. */
>
> How about going a step further and also changing
>
> sframe_decoder_set_func_reloc_index (sfd_info, i,
> (cookie->rel - cookie->rels));
>
> to
>
> sframe_decoder_set_func_reloc_index (sfd_info, i, i);
>
> ?
Good point, makes sense! Added to v2. Waiting for Indu's feedback
before sending anew. Also fixed the missing GNU ChangeLog in the
commit message.
Regards,
Jens
--
Jens Remus
Linux on Z Development (D3303)
+49-7031-16-1128 Office
jremus@de.ibm.com
IBM
IBM Deutschland Research & Development GmbH; Vorsitzender des Aufsichtsrats: Wolfgang Wendt; Geschäftsführung: David Faller; Sitz der Gesellschaft: Böblingen; Registergericht: Amtsgericht Stuttgart, HRB 243294
IBM Data Privacy Statement: https://www.ibm.com/privacy/
More information about the Binutils
mailing list