* config/tc-mips.c (md_apply_fix): Don't subtract the symbol value
authorRichard Sandiford <rdsandiford@googlemail.com>
Fri, 3 Aug 2001 18:33:34 +0000 (18:33 +0000)
committerRichard Sandiford <rdsandiford@googlemail.com>
Fri, 3 Aug 2001 18:33:34 +0000 (18:33 +0000)
from GPREL addends.

gas/ChangeLog
gas/config/tc-mips.c

index ede25334b4d7d4b608f05431f9aa40f38bddf34b..0dca9480986b0026ecfad83ffd2a37821f4d77f8 100644 (file)
@@ -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.
index aa2599075994363fa601c3c62b6d7f8de9fe25c8..74e206a3ee2d13e1d47883b08249b06370a121ec 100644 (file)
@@ -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