This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

A mips n32/n64 gas bug?


Does this make any senses?


H.J.
----
--- gas/config/tc-mips.c.gprel	
+++ gas/config/tc-mips.c
@@ -13396,7 +13396,16 @@ tc_gen_reloc (section, fixp)
       && (code == BFD_RELOC_GPREL16 || code == BFD_RELOC_MIPS16_GPREL)
       && reloc->addend != 0
       && mips_need_elf_addend_fixup (fixp))
-    reloc->addend += S_GET_VALUE (fixp->fx_addsy);
+    {
+      /* In o32 GPREL16 is always inplace, but in n32 and 64
+         it isn't. I wish someone would get rid of this "fix". */
+      reloc_howto_type *howto;
+
+      howto = bfd_reloc_type_lookup (stdoutput, fixp->fx_r_type);
+      if (howto->partial_inplace) {
+       reloc->addend += S_GET_VALUE (fixp->fx_addsy);
+      }
+    }
 #endif
 
   /* To support a PC relative reloc when generating embedded PIC code


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]