OSDN Git Service

* config/tc-sh.c (md_apply_fix3) <BFD_RELOC_32_PLT_PCREL>: Don't
authorAlexandre Oliva <aoliva@redhat.com>
Wed, 6 Feb 2002 05:34:34 +0000 (05:34 +0000)
committerAlexandre Oliva <aoliva@redhat.com>
Wed, 6 Feb 2002 05:34:34 +0000 (05:34 +0000)
assume fixP->fx_subsy is non-NULL.

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

index fa48ad6..76413b6 100644 (file)
@@ -1,3 +1,8 @@
+2002-02-06  Alexandre Oliva  <aoliva@redhat.com>
+
+       * config/tc-sh.c (md_apply_fix3) <BFD_RELOC_32_PLT_PCREL>: Don't
+       assume fixP->fx_subsy is non-NULL.
+
 2002-02-04  Alexandre Oliva  <aoliva@redhat.com>
 
        * config/tc-sh.c (parse_at): Set arg type of @(expr,pc) to
index ce780a1..b266b80 100644 (file)
@@ -2975,7 +2975,9 @@ md_apply_fix3 (fixP, valP, seg)
       /* Make the jump instruction point to the address of the operand.  At
         runtime we merely add the offset to the actual PLT entry.  */
       * valP = 0xfffffffc;
-      val = fixP->fx_addnumber - S_GET_VALUE (fixP->fx_subsy);
+      val = fixP->fx_addnumber;
+      if (fixP->fx_subsy)
+       val -= S_GET_VALUE (fixP->fx_subsy);
       md_number_to_chars (buf, val, 4);
       break;