[0/8] bfd: another little bit of reloc enum cleanup

Message ID 76acf518-e951-4737-8444-6718df6ce778@suse.com
Headers
Series bfd: another little bit of reloc enum cleanup |

Message

Jan Beulich March 13, 2026, 9:48 a.m. UTC
  There are still some unused and many redundant entries.

1: mcore: drop BFD_RELOC_MCORE_{PCREL_32,RVA}
2: mn10300: drop BFD_RELOC_MN10300_*_PCREL
3: sh: drop unused relocation enumerators
4: ELF: fold BFD_RELOC_<arch>_GOTOFF*
5: s390+sh: don't abuse BFD_RELOC_32_GOT_PCREL
6: ELF: fold BFD_RELOC_<arch>_GOTPC*
7: Sparc: drop 64-bit BFD_RELOC_* aliases
8: ELF: fold BFD_RELOC_<arch>_PCREL*

Jan
  

Comments

Jens Remus March 13, 2026, 5:36 p.m. UTC | #1
On 3/13/2026 10:48 AM, Jan Beulich wrote:
> There are still some unused and many redundant entries.
> 
> 1: mcore: drop BFD_RELOC_MCORE_{PCREL_32,RVA}
> 2: mn10300: drop BFD_RELOC_MN10300_*_PCREL
> 3: sh: drop unused relocation enumerators
> 4: ELF: fold BFD_RELOC_<arch>_GOTOFF*
> 5: s390+sh: don't abuse BFD_RELOC_32_GOT_PCREL
> 6: ELF: fold BFD_RELOC_<arch>_GOTPC*
> 7: Sparc: drop 64-bit BFD_RELOC_* aliases
> 8: ELF: fold BFD_RELOC_<arch>_PCREL*

Hi Jan,

thank you for the effort!

IIUC - provided all of those changes are non-API breaking - similar
could be done to fold R_390_PLTOFF16, R_390_PLTOFF32 R_390_PLTOFF64 into
BFD_RELOC_*_PLTOFF?  Or is the semantic different?

Thanks and regards,
Jens
  
Jan Beulich March 15, 2026, 10:46 a.m. UTC | #2
On 13.03.2026 18:36, Jens Remus wrote:
> On 3/13/2026 10:48 AM, Jan Beulich wrote:
>> There are still some unused and many redundant entries.
>>
>> 1: mcore: drop BFD_RELOC_MCORE_{PCREL_32,RVA}
>> 2: mn10300: drop BFD_RELOC_MN10300_*_PCREL
>> 3: sh: drop unused relocation enumerators
>> 4: ELF: fold BFD_RELOC_<arch>_GOTOFF*
>> 5: s390+sh: don't abuse BFD_RELOC_32_GOT_PCREL
>> 6: ELF: fold BFD_RELOC_<arch>_GOTPC*
>> 7: Sparc: drop 64-bit BFD_RELOC_* aliases
>> 8: ELF: fold BFD_RELOC_<arch>_PCREL*
> 
> IIUC - provided all of those changes are non-API breaking - similar
> could be done to fold R_390_PLTOFF16, R_390_PLTOFF32 R_390_PLTOFF64 into
> BFD_RELOC_*_PLTOFF?  Or is the semantic different?

Quite likely more folding is indeed possible. Just requires more time ...

Jan