This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
A mips n32/n64 gas bug?
- From: "H. J. Lu" <hjl at lucon dot org>
- To: binutils at sources dot redhat dot com
- Date: Wed, 12 Mar 2003 09:52:02 -0800
- Subject: 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