* write.c (fixup_segment <Difference of 2 syms same seg>): If
authorAlan Modra <amodra@gmail.com>
Wed, 27 Jun 2001 03:14:47 +0000 (03:14 +0000)
committerAlan Modra <amodra@gmail.com>
Wed, 27 Jun 2001 03:14:47 +0000 (03:14 +0000)
pcrel, subtract MD_PCREL_FROM_SECTION value.

gas/ChangeLog
gas/write.c

index bc43595c7f3ed5a6dbb2ec74a32bb6c912285ded..270b2b178f92ec78e347f28f420206e7a10b9b6a 100644 (file)
@@ -1,3 +1,8 @@
+2001-06-27  Tracy A. Kuhrt  <Tracy.Kuhrt@microchip.com>
+
+       * write.c (fixup_segment <Difference of 2 syms same seg>): If
+       pcrel, subtract MD_PCREL_FROM_SECTION value.
+
 2001-06-24  Ben Elliston  <bje@redhat.com>
 
        * stabs.c (generate_asm_file): Make local variable `len' a size_t.
@@ -34,8 +39,9 @@
 
 2001-06-22  Matthew Wilcox  <willy@ldl.fc.hp.com>
 
-       * config/tc-hppa.c: Add %mrp (millicode return pointer) alias
-       for %r2 or %r31, depending on 32 or 64 bit architecture.
+       * config/tc-hppa.c (pre_defined_registers): Add %mrp (millicode
+       return pointer) alias for %r2 or %r31, depending on 32 or 64 bit
+       architecture.
 
 2001-06-21  Philip Blundell  <philb@gnu.org>
 
index ff63836e0934900a142d8d6b5b734f8b185385a1..b6492c27e4e961a3f3f44bb7f06c33f503180f79 100644 (file)
@@ -2661,8 +2661,10 @@ fixup_segment (fixP, this_segment_type)
                as_bad_where (fixP->fx_file, fixP->fx_line,
                              _("callj to difference of 2 symbols"));
 #endif /* TC_I960  */
-             add_number += S_GET_VALUE (add_symbolP) -
-               S_GET_VALUE (sub_symbolP);
+             add_number += (S_GET_VALUE (add_symbolP)
+                            - S_GET_VALUE (sub_symbolP));
+             if (pcrel)
+               add_number -= MD_PCREL_FROM_SECTION (fixP, this_segment_type);
 
              add_symbolP = NULL;
              pcrel = 0;        /* No further pcrel processing.  */