diff options
| author | christos <christos@NetBSD.org> | 2004-06-22 16:35:49 +0000 |
|---|---|---|
| committer | christos <christos@NetBSD.org> | 2004-06-22 16:35:49 +0000 |
| commit | d6bf74cb9ef5ed3198889bdaec323e7dcb3fa20b (patch) | |
| tree | c6899a47d66449afeabef5ae7277ef37b385cd20 /gnu | |
| parent | b83f6fa528af013a92398aaf206738b4d4434b0b (diff) | |
Add a check for a non-null owner before dereferencing it. Fixes ld core-dumps
related to lkms.
Diffstat (limited to 'gnu')
| -rw-r--r-- | gnu/dist/binutils/bfd/elflink.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/gnu/dist/binutils/bfd/elflink.h b/gnu/dist/binutils/bfd/elflink.h index 24d1eedbd48..514d3846fd8 100644 --- a/gnu/dist/binutils/bfd/elflink.h +++ b/gnu/dist/binutils/bfd/elflink.h @@ -2078,7 +2078,8 @@ elf_link_add_object_symbols (abfd, 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 && + (h->root.u.def.section->owner->flags & DYNAMIC) == 0) { normal_align = h->root.u.def.section->alignment_power; if (normal_align > symbol_align) |
