From: Maciej W. Rozycki Date: Thu, 30 Oct 2025 14:24:23 +0000 (+0000) Subject: MIPS/GAS: Fix microMIPS TLS reloc classification X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=b1e3a6b5941060993e3ab9f72a0f2e0016efdc2e;p=thirdparty%2Fbinutils-gdb.git MIPS/GAS: Fix microMIPS TLS reloc classification Fix `micromips_reloc_p' wrongly classifying microMIPS TLS relocations as non microMIPS relocations. Owing to where the function is called this issue does not trigger in reality, but with an upcoming change it would, where suitable tests will be included. --- diff --git a/gas/config/tc-mips.c b/gas/config/tc-mips.c index 1f85b81da45..f7ee46c68f2 100644 --- a/gas/config/tc-mips.c +++ b/gas/config/tc-mips.c @@ -4297,6 +4297,13 @@ micromips_reloc_p (bfd_reloc_code_real_type reloc) case BFD_RELOC_MICROMIPS_HIGHER: case BFD_RELOC_MICROMIPS_SCN_DISP: case BFD_RELOC_MICROMIPS_JALR: + case BFD_RELOC_MICROMIPS_TLS_GD: + case BFD_RELOC_MICROMIPS_TLS_LDM: + case BFD_RELOC_MICROMIPS_TLS_DTPREL_HI16: + case BFD_RELOC_MICROMIPS_TLS_DTPREL_LO16: + case BFD_RELOC_MICROMIPS_TLS_GOTTPREL: + case BFD_RELOC_MICROMIPS_TLS_TPREL_HI16: + case BFD_RELOC_MICROMIPS_TLS_TPREL_LO16: return true; default: