[PATCH v2 03/10] BFD: Rename `*_set_reloc' to `*_finalize_section_relocs'
Jan Beulich
jbeulich@suse.com
Mon Nov 10 06:21:08 GMT 2025
On 08.11.2025 15:59, Maciej W. Rozycki wrote:
> On Fri, 7 Nov 2025, Jan Beulich wrote:
>
>>> --- binutils-gdb.orig/bfd/bfd-in2.h
>>> +++ binutils-gdb/bfd/bfd-in2.h
>>> @@ -2620,11 +2620,12 @@ long bfd_get_reloc_upper_bound (bfd *abf
>>> long bfd_canonicalize_reloc
>>> (bfd *abfd, asection *sec, arelent **loc, asymbol **syms);
>>>
>>> -void bfd_set_reloc
>>> +void bfd_finalize_section_relocs
>>> (bfd *abfd, asection *sec, arelent **rel, unsigned int count);
>>
>> What use is this declaration? Can't it be dropped rather than being
>> modified? All callers ...
>>
>>> -#define bfd_set_reloc(abfd, asect, location, count) \
>>> - BFD_SEND (abfd, _bfd_set_reloc, (abfd, asect, location, count))
>>> +#define bfd_finalize_section_relocs(abfd, asect, location, count) \
>>> + BFD_SEND (abfd, _bfd_finalize_section_relocs, \
>>> + (abfd, asect, location, count))
>>
>> ... end up using this macro anyway, afaict.
>
> It's a mechanical change and not a code cleanup. Please feel free to
> investigate whether the prototype is needed or not and offer a separate
> change if desired. I don't think such an investigation ought to be a
> prerequisite for this change to be accepted.
Hmm, I can see your point, but then I also somewhat disagree. Yes, it's not
strictly a prereq. Yet at the same time, (reasonably) obvious cleanup is
also a good thing to happen while code is being touched anyway. Else it's
pretty likely to never happen.
Jan
More information about the Binutils
mailing list