]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
MIPS: Correct HI/LO rela reloc howto special_function entries
authorAlan Modra <amodra@gmail.com>
Sun, 6 Jul 2025 18:22:49 +0000 (19:22 +0100)
committerMaciej W. Rozycki <macro@orcam.me.uk>
Sun, 6 Jul 2025 18:22:49 +0000 (19:22 +0100)
commit90dfcb5aa2c904253fdaa90501451973a82030aa
tree1bec4aadd25148148aa6159a0858bed04ba844e4
parentce08b3bb19b372877128ae9d935c1fe52afc33ae
MIPS: Correct HI/LO rela reloc howto special_function entries

The patch corrects the mips16 and micromips rela tables to *not*
use _bfd_mips_elf_{hi,lo}16_reloc.  These special functions are
inappropriate for RELA relocs where addends are in the reloc rather
than in the section contents.  See corresponding rela R_MIPS howtos.

bfd/
* elf64-mips.c (mips16_elf64_howto_table_rela)
<R_MIPS16_HI16, R_MIPS16_LO16>: Use _bfd_mips_elf_generic_reloc
special_function.
(micromips_elf64_howto_table_rela)
<R_MICROMIPS_HI16, R_MICROMIPS_LO16>: Similarly.
* elfn32-mips.c: As for elf64-mips.c.
bfd/elf64-mips.c
bfd/elfn32-mips.c