[PATCH 8/8] bfd/ELF: fold BFD_RELOC_<arch>_PCREL*
Jan Beulich
jbeulich@suse.com
Thu Mar 19 07:41:59 GMT 2026
On 16.03.2026 03:34, mengqinggang wrote:
> 在 2026/3/13 18:00, Jan Beulich 写道:
>
>> There's no need to have a separate reloc per arch; just like for other
>> more or less generic ones a single one will (mostly) do, as long as the
>> resulting reloc's properties fit such a generic use (in the assembler it
>> could, after all, also result from ordinary expressions or uses with the
>> .reloc directive). Arm64, C-Sky, and KVX - sadly - are once again
>> exceptions.
>>
>> For cris it's a PLT reloc which is being replaced.
>>
>> For msp430 also drop BFD_RELOC_MSP430_16_BYTE, which has already been
>> merely an alias of BFD_RELOC_16 (resolving to R_MSP430_16_BYTE).
>> ---
>> It's not clear to me why LoongArch's "fast" lookup stopped at
>> BFD_RELOC_LARCH_RELAX (which is also unlike the range special cased in
>> gas); subsequent relocations also are contiguous. IOW instead of dropping
>> BFD_RELOC_LARCH_{32,64}_PCREL (and moving the "terminator" slightly back),
>> the target may want (need) excluding here as well.
>
> Maybe we forgot to modify here when adding new relocations.
Question then is - should I make the change here at all? Or do you want me
to leave LoongArch alone?
Jan
More information about the Binutils
mailing list