[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: segfault in bfd_elf32_bfd_link_add_symbols (2.14.90.0.5)
From: |
Alan Modra |
Subject: |
Re: segfault in bfd_elf32_bfd_link_add_symbols (2.14.90.0.5) |
Date: |
Sat, 23 Aug 2003 13:39:51 +0930 |
User-agent: |
Mutt/1.4i |
On Tue, Aug 19, 2003 at 02:07:42PM +0200, David Le Corfec wrote:
> The 2 objects are at http://dlc.nerim.net/objs/
> just doing "ld exec_library.o graphics_hidd.o" causes the segfaults with
It's a bug in handling of absolute symbols.
* elflink.h (elf_link_add_object_symbols): Don't crash on NULL owner.
Index: bfd/elflink.h
===================================================================
RCS file: /cvs/src/src/bfd/elflink.h,v
retrieving revision 1.239
diff -u -p -r1.239 elflink.h
--- bfd/elflink.h 20 Aug 2003 08:37:19 -0000 1.239
+++ bfd/elflink.h 23 Aug 2003 04:02:17 -0000
@@ -1186,7 +1186,8 @@ elf_link_add_object_symbols (bfd *abfd,
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)
--
Alan Modra
IBM OzLabs - Linux Technology Centre