aboutsummaryrefslogtreecommitdiff
path: root/bfd/elflink.h
diff options
context:
space:
mode:
Diffstat (limited to 'bfd/elflink.h')
-rw-r--r--bfd/elflink.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/bfd/elflink.h b/bfd/elflink.h
index beab0d0..83f0eb0 100644
--- a/bfd/elflink.h
+++ b/bfd/elflink.h
@@ -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;