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

Hans-Peter Nilsson hp@bitrange.com
Thu Feb 27 14:18:49 GMT 2025


On Thu, 27 Feb 2025, 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.

There's material for a hacker haiku there. :-)

I think it's the first time I see that kind of wart.

Maybe I shouldn't feel too bad about not seeing the end-of-loop 
increment even though I brought up the file, as clearly the 
author of one of the increments didn't.  One day gcc might grow 
to spot such a redundant setting, but this one might be too hard 
to see.

brgds, H-P


More information about the Binutils mailing list