]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
MIPS/GAS: Add HI16/LO16 pairing for REL TLS relocs
authorMaciej W. Rozycki <macro@orcam.me.uk>
Thu, 30 Oct 2025 14:24:23 +0000 (14:24 +0000)
committerMaciej W. Rozycki <macro@orcam.me.uk>
Thu, 30 Oct 2025 14:24:23 +0000 (14:24 +0000)
commitad26c67309c780aa06c6066924a04f15b9a6c029
treeecc0171a66b68f2a38a305bed9bad3192c6f10f4
parentb1e3a6b5941060993e3ab9f72a0f2e0016efdc2e
MIPS/GAS: Add HI16/LO16 pairing for REL TLS relocs

Complementing commit 7ea90d9316d3 ("MIPS: Fix linker for REL TLS
HI16/LO16 relocs") also add pairing for HI16/LO16 REL TLS relocations
in GAS, which is where it needs to be done in the first place and
which is required for later linker operation on the objects produced.

Pairing also corrects in-place addend installation for the high-part
relocations, which used not to happen in the absence of this fix for
ones not already followed by the corresponding low-part relocation.

Add test cases to verify relocation ordering and addend installation.
gas/config/tc-mips.c
gas/testsuite/gas/mips/micromips-tls-hilo-addend.d [new file with mode: 0644]
gas/testsuite/gas/mips/micromips-tls-hilo-match.d [new file with mode: 0644]
gas/testsuite/gas/mips/mips-tls-hilo-match.s [new file with mode: 0644]
gas/testsuite/gas/mips/mips.exp
gas/testsuite/gas/mips/mips16-tls-hilo-addend.d [new file with mode: 0644]
gas/testsuite/gas/mips/mips16-tls-hilo-match.d [new file with mode: 0644]