[PATCH 4/8] bfd/ELF: fold BFD_RELOC_<arch>_GOTOFF*

Jan Beulich jbeulich@suse.com
Thu Mar 19 07:32:46 GMT 2026


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.

Jan


More information about the Binutils mailing list