aboutsummaryrefslogtreecommitdiff
path: root/bfd
diff options
context:
space:
mode:
authorIan Lance Taylor <ian@airs.com>1996-02-05 15:47:53 +0000
committerIan Lance Taylor <ian@airs.com>1996-02-05 15:47:53 +0000
commite303e2e3589a0aba00d43b71e5442c9ece6a59c3 (patch)
tree1f76ca9668906fffed1e341ac545d354d576f132 /bfd
parent0f09ddd4d24712893aec0679cc3d0b2c9e4bc479 (diff)
downloadgdb-e303e2e3589a0aba00d43b71e5442c9ece6a59c3.zip
gdb-e303e2e3589a0aba00d43b71e5442c9ece6a59c3.tar.gz
gdb-e303e2e3589a0aba00d43b71e5442c9ece6a59c3.tar.bz2
* elflink.h (elf_adjust_dynamic_symbol): Don't try to get the
flavour of a section with no owner.
Diffstat (limited to 'bfd')
-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;