]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
MIPS/GAS: Fix microMIPS TLS reloc classification
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)
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.

gas/config/tc-mips.c

index 1f85b81da45cec26f3936a5a030213bc40169b6a..f7ee46c68f237386f8429e7e2a65c343f7acc6ce 100644 (file)
@@ -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: