* elflink.h (elf_adjust_dynamic_symbol): Don't try to get the
authorIan Lance Taylor <ian@airs.com>
Mon, 5 Feb 1996 15:47:53 +0000 (15:47 +0000)
committerIan Lance Taylor <ian@airs.com>
Mon, 5 Feb 1996 15:47:53 +0000 (15:47 +0000)
flavour of a section with no owner.

bfd/elflink.h

index beab0d0adc64ff5b33c35a340bd0792c14c0abac..83f0eb0bc81e81a381d91f60095952091f39a640 100644 (file)
@@ -1524,8 +1524,9 @@ elf_adjust_dynamic_symbol (h, data)
        h->elf_link_hash_flags |= ELF_LINK_HASH_REF_REGULAR;
       else
        {
-         if (bfd_get_flavour (h->root.u.def.section->owner)
-             == bfd_target_elf_flavour)
+         if (h->root.u.def.section->owner != NULL
+             && (bfd_get_flavour (h->root.u.def.section->owner)
+                 == bfd_target_elf_flavour))
            h->elf_link_hash_flags |= ELF_LINK_HASH_REF_REGULAR;
          else
            h->elf_link_hash_flags |= ELF_LINK_HASH_DEF_REGULAR;