[PATCH v2 02/10] GAS: Unify code for SET_SECTION_RELOCS call

Jan Beulich jbeulich@suse.com
Fri Nov 7 14:44:50 GMT 2025


On 05.11.2025 03:46, Maciej W. Rozycki wrote:
> Fold a separate call to `bfd_set_reloc' into SET_SECTION_RELOCS itself, 
> so that the GAS interface to this facility is contained in a single 
> invocation.
> 
> Set the macro by default to a plain call to `bfd_set_reloc', letting 
> backends override the macro, with the requirement now to factor in a 
> call to said function.  Update the COFF variant accordingly, moving it 
> to a new function for a better code structure, retaining functionality.
> 
> This is in preparation for `bfd_set_reloc' to return an error status.

It's not becoming clear to me how this will end up being useful. In gas
there's a single call site right now. Hence only a single place where
you would need to make adjustments. Whereas with the change in place,
in order to handle the error status, you will need to make changes in
at least two places.

Jan


More information about the Binutils mailing list