From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ian Lance Taylor To: hjl@zoom.com Cc: eric@aib.com, gas2@cygnus.com Subject: Re: An ELF ld bug Date: Mon, 29 Jan 1996 10:08:00 -0000 Message-id: <199601291808.NAA06278@sanguine.cygnus.com> References: X-SW-Source: 1996/msg00006.html From: hjl@zoom.com (H.J. Lu) Date: Sun, 28 Jan 1996 09:39:01 -0800 (PST) I found an ELF linker bug. What happened is if I defined a weak symbol plus a weak alias, the linker would dump core. Does anyone has a fix? I checked in this patch, which should fix it. (Your patch was incorrect, because weakdef is not a linked list, except temporarily during elf_link_add_object_symbols). Ian Index: elflink.h =================================================================== RCS file: /cvs/cvsfiles/devo/bfd/elflink.h,v retrieving revision 1.30 diff -u -r1.30 elflink.h --- elflink.h 1996/01/25 17:15:24 1.30 +++ elflink.h 1996/01/29 18:06:21 @@ -868,8 +868,7 @@ h = *hpp; if (h != NULL && h != hlook - && (h->root.type == bfd_link_hash_defined - || h->root.type == bfd_link_hash_defweak) + && h->root.type == bfd_link_hash_defined && h->root.u.def.section == slook && h->root.u.def.value == vlook) {