aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Sandiford <rdsandiford@googlemail.com>2001-08-03 18:33:34 +0000
committerRichard Sandiford <rdsandiford@googlemail.com>2001-08-03 18:33:34 +0000
commit236bd878b53a34c7d0ee76d60450ad53f2ea14a5 (patch)
treee7af8c26f72ecdceb9d0ae9dd8a776019a153ffc
parentc918cb968c5298efb58889698424de2125b7ea32 (diff)
downloadgdb-236bd878b53a34c7d0ee76d60450ad53f2ea14a5.zip
gdb-236bd878b53a34c7d0ee76d60450ad53f2ea14a5.tar.gz
gdb-236bd878b53a34c7d0ee76d60450ad53f2ea14a5.tar.bz2
* config/tc-mips.c (md_apply_fix): Don't subtract the symbol value
from GPREL addends.
-rw-r--r--gas/ChangeLog5
-rw-r--r--gas/config/tc-mips.c4
2 files changed, 8 insertions, 1 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog
index ede2533..0dca948 100644
--- a/gas/ChangeLog
+++ b/gas/ChangeLog
@@ -1,3 +1,8 @@
+2001-08-03 Richard Sandiford <rsandifo@redhat.com>
+
+ * config/tc-mips.c (md_apply_fix): Don't subtract the symbol value
+ from GPREL addends.
+
2001-08-02 Richard Sandiford <rsandifo@redhat.com>
* doc/c-mips.tex (-mgp32, -mfp32): Added -mfp32, unified with -mgp32.
diff --git a/gas/config/tc-mips.c b/gas/config/tc-mips.c
index aa25990..74e206a 100644
--- a/gas/config/tc-mips.c
+++ b/gas/config/tc-mips.c
@@ -9527,7 +9527,9 @@ md_apply_fix (fixP, valueP)
{
valueT symval = S_GET_VALUE (fixP->fx_addsy);
value -= symval;
- if (value != 0 && ! fixP->fx_pcrel)
+ if (value != 0
+ && ! fixP->fx_pcrel
+ && fixP->fx_r_type != BFD_RELOC_MIPS_GPREL)
{
/* In this case, the bfd_install_relocation routine will
incorrectly add the symbol value back in. We just want