From 2.11 branch 2001-03-30 Richard Henderson <rth@redhat.com>
authorAlan Modra <amodra@gmail.com>
Thu, 24 May 2001 23:52:22 +0000 (23:52 +0000)
committerAlan Modra <amodra@gmail.com>
Thu, 24 May 2001 23:52:22 +0000 (23:52 +0000)
* config/tc-i386.c (md_convert_frag): Don't die on local symbols
that have been finalized.

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

index f9a03e2f896e7697b6e9fef92f8c9bd977e80bd1..6f5b600418cd67f05fbf356cc94be7ac383df16c 100644 (file)
@@ -1,5 +1,9 @@
 2001-05-25  Alan Modra  <amodra@one.net.au>
 
+       From 2.11 branch 2001-03-30  Richard Henderson  <rth@redhat.com>
+       * config/tc-i386.c (md_convert_frag): Don't die on local symbols
+       that have been finalized.
+
        * symbols.c (resolve_symbol_value): Clear sy_resolving before
        taking exit_dont_set_value.
 
index a710532500a765d058d27ea413f770a76ea2fde2..2a13bd93298c32de439e63fdd88ff8cb12ecda37 100644 (file)
@@ -4049,7 +4049,12 @@ md_convert_frag (abfd, sec, fragP)
   target_address = S_GET_VALUE (fragP->fr_symbol) + fragP->fr_offset;
 #ifdef BFD_ASSEMBLER
   /* Not needed otherwise?  */
-  target_address += symbol_get_frag (fragP->fr_symbol)->fr_address;
+  {
+    /* Local symbols which have already been resolved have a NULL frag.  */
+    fragS *sym_frag = symbol_get_frag (fragP->fr_symbol);
+    if (sym_frag)
+      target_address += sym_frag->fr_address;
+  }
 #endif
 
   /* Address opcode resides at in file space.  */