aboutsummaryrefslogtreecommitdiff
path: root/gas/config
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2003-05-06 00:28:25 +0000
committerH.J. Lu <hjl.tools@gmail.com>2003-05-06 00:28:25 +0000
commitd8dbbec1ca5c4db8b0d01a3d3e4a67fa5456a6f5 (patch)
tree56c608bfafe0a3fb151329c344f2f69efc8f8410 /gas/config
parent9204e615fb7c9a6f6177a5670e2ffdaa88dabdf8 (diff)
downloadgdb-d8dbbec1ca5c4db8b0d01a3d3e4a67fa5456a6f5.zip
gdb-d8dbbec1ca5c4db8b0d01a3d3e4a67fa5456a6f5.tar.gz
gdb-d8dbbec1ca5c4db8b0d01a3d3e4a67fa5456a6f5.tar.bz2
2003-05-05 H.J. Lu <hjl@gnu.org>
* config/tc-mips.c (tc_gen_reloc): Add addend just once if howto->partial_inplace is false.
Diffstat (limited to 'gas/config')
-rw-r--r--gas/config/tc-mips.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/gas/config/tc-mips.c b/gas/config/tc-mips.c
index 59f0b3d..1c5602f 100644
--- a/gas/config/tc-mips.c
+++ b/gas/config/tc-mips.c
@@ -13940,7 +13940,15 @@ 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);
+ {
+ /* If howto->partial_inplace is false, md_apply_fix3 will only
+ subtract it once. */
+ 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