aboutsummaryrefslogtreecommitdiff
path: root/bfd/elflink.h
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2003-08-23 04:10:34 +0000
committerAlan Modra <amodra@gmail.com>2003-08-23 04:10:34 +0000
commit40a0491a90506be953114a472d7562c7afb5b600 (patch)
tree3184100d75375a5ef049d41f96cde5cc2ce19f05 /bfd/elflink.h
parent4be5d5207ca013d5a5fb2bdf7cb5de1c93d2892e (diff)
downloadgdb-40a0491a90506be953114a472d7562c7afb5b600.zip
gdb-40a0491a90506be953114a472d7562c7afb5b600.tar.gz
gdb-40a0491a90506be953114a472d7562c7afb5b600.tar.bz2
* elflink.h (elf_link_add_object_symbols): Don't crash on NULL owner.
Diffstat (limited to 'bfd/elflink.h')
-rw-r--r--bfd/elflink.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/bfd/elflink.h b/bfd/elflink.h
index d667993..48b86cf 100644
--- a/bfd/elflink.h
+++ b/bfd/elflink.h
@@ -1186,7 +1186,8 @@ elf_link_add_object_symbols (bfd *abfd, struct bfd_link_info *info)
bfd *common_bfd;
symbol_align = ffs (h->root.u.def.value) - 1;
- if ((h->root.u.def.section->owner->flags & DYNAMIC) == 0)
+ if (h->root.u.def.section->owner != NULL
+ && (h->root.u.def.section->owner->flags & DYNAMIC) == 0)
{
normal_align = h->root.u.def.section->alignment_power;
if (normal_align > symbol_align)