[PATCH 4/8] bfd/ELF: fold BFD_RELOC_<arch>_GOTOFF*
Jens Remus
jremus@linux.ibm.com
Thu Mar 19 08:46:10 GMT 2026
On 3/19/2026 8:32 AM, Jan Beulich wrote:
> On 13.03.2026 17:17, Jens Remus wrote:
>> On 3/13/2026 10:54 AM, Jan Beulich wrote:
>>> For many of the cases there's no need to have separate relocs per arch;
>>> just like for other more or less generic ones a single one (per purpose;
>>> a 64-bit generic one is being introduced) will do. Arm64, C-Sky, and
>>> KVX - sadly - continue to be exceptions.
>>
>>> --- a/gas/config/tc-m32r.c
>>> +++ b/gas/config/tc-m32r.c
>>> @@ -1967,11 +1967,11 @@ m32r_cgen_record_fixup_exp (fragS *frag,
>>>
>>> case BFD_RELOC_M32R_GOTOFF:
>>> if (fixP->fx_cgen.opinfo == BFD_RELOC_M32R_HI16_SLO)
>>> - r_type = BFD_RELOC_M32R_GOTOFF_HI_SLO;
>>> + r_type = BFD_RELOC_HI16_S_GOTOFF;
>>> else if (fixP->fx_cgen.opinfo == BFD_RELOC_M32R_HI16_ULO)
>>> - r_type = BFD_RELOC_M32R_GOTOFF_HI_ULO;
>>> + r_type = BFD_RELOC_HI16_GOTOFF;
>>> else if (fixP->fx_cgen.opinfo == BFD_RELOC_M32R_LO16)
>>> - r_type = BFD_RELOC_M32R_GOTOFF_LO;
>>> + r_type = BFD_RELOC_LO16_GOTOFF;
>>> break;
>>>
>>> case BFD_RELOC_M32R_26_PLTREL:
>>
>> git am complained this patch would be adding 3 lines with whitespace
>> errors. Looking at the source it seems you did the most logical thing
>> though.
>
> Hmm, interesting. That must be the 8 blanks which should be a hard tab. I
> can fix that as I'm touching the lines, sure.
Looking at the indentation in the file the use of tabs is rather seldom,
so I think it is ok to use spaces, so that it stays consistent.
Regards,
Jens
--
Jens Remus
Linux on Z Development (D3303)
jremus@de.ibm.com / jremus@linux.ibm.com
IBM Deutschland Research & Development GmbH; Vorsitzender des Aufsichtsrats: Wolfgang Wendt; Geschäftsführung: David Faller; Sitz der Gesellschaft: Ehningen; Registergericht: Amtsgericht Stuttgart, HRB 243294
IBM Data Privacy Statement: https://www.ibm.com/privacy/
More information about the Binutils
mailing list