When calculating offsets, don't accept as constant the difference between the
authorNick Clifton <nickc@redhat.com>
Fri, 1 Dec 2000 19:06:15 +0000 (19:06 +0000)
committerNick Clifton <nickc@redhat.com>
Fri, 1 Dec 2000 19:06:15 +0000 (19:06 +0000)
addresses of symbols in two different sections.

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

index 8dc67685f96a43e2c658f62c3e62f3a06a187ac5..caed5bc850afdde6c36f3fbe9c51a6e6e16b4dc9 100644 (file)
@@ -1,9 +1,15 @@
+2000-12-01  Chris Demetriou  <cgd@sibyte.com>
+
+        * config/tc-mips.c (mips_ip): When calculating offsets,
+        don't accept as constant the difference between the
+        addresses of symbols in two different sections.
+
 2000-12-01      Joel Sherrill <joel@OARcorp.com>
 
-        * configure.in (arm-*-rtems*, a29k-*rtems*, h8300-*-rtems*):
-        New targets.
-        (sparc*-*-rtemself*, sparc*-*-rtemsaout*): New targets.
-        (sparc*-*-rtems*): Switched from a.out to ELF.
+       * configure.in (arm-*-rtems*, a29k-*rtems*, h8300-*-rtems*):
+       New targets.
+       (sparc*-*-rtemself*, sparc*-*-rtemsaout*): New targets.
+       (sparc*-*-rtems*): Switched from a.out to ELF.
        * configure: Regenerate.
        * config.in: Regenerate.
        * Makefile.in: Regenerate.
index 19490a86b408cada3cd34f54fb50a1d49a921e1e..ef6304dbb8e4dd5ca7b3137a3a39755b30324fbe 100644 (file)
@@ -7873,8 +7873,8 @@ mips_ip (str, ip)
                      || offset_expr.X_add_number < -0x8000)
                  && (mips_pic != EMBEDDED_PIC
                      || offset_expr.X_op != O_subtract
-                     || (S_GET_SEGMENT (offset_expr.X_op_symbol)
-                         != now_seg)))
+                     || (S_GET_SEGMENT (offset_expr.X_add_symbol)
+                         != S_GET_SEGMENT (offset_expr.X_op_symbol))))
                break;
 
              if (c == 'h' || c == 'H')