* write.c (adjust_reloc_syms): Check that symbol is not NULL
authorIan Lance Taylor <ian@airs.com>
Wed, 9 Aug 1995 19:34:00 +0000 (19:34 +0000)
committerIan Lance Taylor <ian@airs.com>
Wed, 9 Aug 1995 19:34:00 +0000 (19:34 +0000)
before checking sy_mri_common.
(fixup_segment): Likewise.
* config/obj-coff.c (fixup_segment): Likewise.

gas/config/obj-coff.c
gas/write.c

index b48900b96f4aff610a0a689c81ca10668d55d291..a5c04d2a1e8cff2f4bf807c9235900f6b45d0299 100644 (file)
@@ -3641,7 +3641,8 @@ fixup_segment (segP, this_segment_type)
       add_number = fixP->fx_offset;
       pcrel = fixP->fx_pcrel;
 
-      if (add_symbolP->sy_mri_common)
+      if (add_symbolP != NULL
+         && add_symbolP->sy_mri_common)
        {
          know (add_symbolP->sy_value.X_op == O_symbol);
          add_number += S_GET_VALUE (add_symbolP);
index f9ec214eb5085d08e7af0309fe2e762a1da440c4..ae7d8eea7345fcf3b37a7b258bb2776e1a4eb4ad 100644 (file)
@@ -630,7 +630,7 @@ adjust_reloc_syms (abfd, sec, xxx)
        sym = fixp->fx_addsy;
        symsec = sym->bsym->section;
 
-       if (sym->sy_mri_common)
+       if (sym != NULL && sym->sy_mri_common)
          {
            /* These symbols are handled specially in fixup_segment.  */
            goto done;
@@ -2169,7 +2169,8 @@ fixup_segment (fixP, this_segment_type)
       pcrel = fixP->fx_pcrel;
       plt = fixP->fx_plt;
 
-      if (add_symbolP->sy_mri_common)
+      if (add_symbolP != NULL
+         && add_symbolP->sy_mri_common)
        {
          know (add_symbolP->sy_value.X_op == O_symbol);
          add_number += S_GET_VALUE (add_symbolP);