MIPS/GAS: Don't convert PC-relative REL relocs against absolute symbols
[deliverable/binutils-gdb.git] / gas / config / tc-mips.c
index 6c0be63d6402340ad020685babf00f96a9f4d9cb..cca545052dc67fb862e0cb34716bad32642fd4ec 100644 (file)
@@ -14814,6 +14814,22 @@ mips_force_relocation (fixS *fixp)
   return 0;
 }
 
+/* Implement TC_FORCE_RELOCATION_ABS.  */
+
+bfd_boolean
+mips_force_relocation_abs (fixS *fixp)
+{
+  if (generic_force_reloc (fixp))
+    return TRUE;
+
+  /* These relocations do not have enough bits in the in-place addend
+     to hold an arbitrary absolute section's offset.  */
+  if (HAVE_IN_PLACE_ADDENDS && limited_pcrel_reloc_p (fixp->fx_r_type))
+    return TRUE;
+
+  return FALSE;
+}
+
 /* Read the instruction associated with RELOC from BUF.  */
 
 static unsigned int
This page took 0.029627 seconds and 4 git commands to generate.