[PATCH 3/3] ld: Cleanup sframe_decoder_init_func_bfdinfo use of cookie->rel
Indu Bhagat
indu.bhagat@oracle.com
Tue Feb 25 00:42:21 GMT 2025
On 2/24/25 7:59 AM, Jens Remus wrote:
> 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.
>
OK. I noticed a typo (on trunk, not your patch) in the function-level
comments of sframe_decoder_init_func_bfdinfo. Lets correct that too.
"information in CFD_INFO," --> information in SFD_INFO
Thanks!
More information about the Binutils
mailing list