(md_apply_fix3): Handle the case where a .byte directive generates a
authorNick Clifton <nickc@redhat.com>
Sat, 20 Dec 2003 08:01:47 +0000 (08:01 +0000)
committerNick Clifton <nickc@redhat.com>
Sat, 20 Dec 2003 08:01:47 +0000 (08:01 +0000)
pc-relative relocation.

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

index 512b58c..dc47f4d 100644 (file)
@@ -1,3 +1,8 @@
+2003-12-20  Nick Clifton  <nickc@redhat.com>
+
+       * config/tc-ppc.c (md_apply_fix3): Handle the case where a
+       .byte directive generates a pc-relative relocation.
+
 2003-12-19  Nick Clifton  <nickc@redhat.com>
             Andreas Schwab  <schwab@suse.de>
 
index f4cf419..86daea0 100644 (file)
@@ -5899,10 +5899,19 @@ md_apply_fix3 (fixP, valP, seg)
 
        case BFD_RELOC_8:
          if (fixP->fx_pcrel)
-           abort ();
-
-         md_number_to_chars (fixP->fx_frag->fr_literal + fixP->fx_where,
-                             value, 1);
+           {
+             /* This can occur if there is a bug in the input assembler, eg:
+                ".byte <undefined_symbol> - ."  */
+             if (fixP->fx_addsy)
+               as_bad (_("Unable to handle reference to symbol %s"),
+                       S_GET_NAME (fixP->fx_addsy));
+             else
+               as_bad (_("Unable to resolve expression"));
+             fixP->fx_done = 1;
+           }
+         else
+           md_number_to_chars (fixP->fx_frag->fr_literal + fixP->fx_where,
+                               value, 1);
          break;
 
        case BFD_RELOC_24_PLT_PCREL: