[PATCH v3 2/3] ld: Cleanup sframe_decoder_init_func_bfdinfo use of reloc cookie

Jan Beulich jbeulich@suse.com
Wed Mar 5 07:16:18 GMT 2025


On 28.02.2025 14:32, Jens Remus wrote:
> The loop did set cookie->rel to the i-th relocation twice.  At the
> beginning using the loop counter.  At the end by incrementing.  One
> approach is sufficient.
> 
> Change cookie to pointer-to-const, replace cookie->rel by rel,
> initialize before the loop and increment at the end, and merge the
> two assertions (for cookie->rel) into one.
> 
> While at it change sec to pointer-to-const.
> 
> bfd/
> 	* elf-sframe.c (sframe_decoder_init_func_bfdinfo): Cleanup use
> 	of relocation cookie.
> 
> Signed-off-by: Jens Remus <jremus@linux.ibm.com>

Okay.

Jan



More information about the Binutils mailing list