Add a check for a non-null owner before dereferencing it. Fixes ld core-dumps
related to lkms.
This commit is contained in:
parent
b83f6fa528
commit
d6bf74cb9e
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue