This is the mail archive of the
binutils@sourceware.cygnus.com
mailing list for the binutils project.
Re: A bfd patch
- To: hjl@varesearch.com
- Subject: Re: A bfd patch
- From: Ian Lance Taylor <ian@zembu.com>
- Date: 19 Jul 1999 13:26:01 -0400
- CC: alan@SPRI.Levels.UniSA.Edu.Au, venom@cibs9.sns.it, binutils@sourceware.cygnus.com
- References: <19990719160740.3A7A83FC1@varesearch.com>
Date: Mon, 19 Jul 1999 09:07:40 -0700 (PDT)
From: hjl@varesearch.com (H.J. Lu)
I believe this patch fixes the i386-pc-linux-gnulibc1 problem. Alan,
venom@cibs9.sns.it, could you please check it out?
Thanks for tracking down the problem. Does this patch work to fix it?
Ian
--- elflink.h.~6~ Fri Jul 16 11:11:54 1999
+++ elflink.h Mon Jul 19 13:23:18 1999
@@ -365,8 +365,12 @@ elf_merge_symbol (abfd, info, name, sym,
/* In cases involving weak versioned symbols, we may wind up trying
to merge a symbol with itself. Catch that here, to avoid the
confusion that results if we try to override a symbol with
- itself. */
- if (abfd == oldbfd)
+ itself. The additional tests catch cases like
+ _GLOBAL_OFFSET_TABLE_, which are regular symbols defined in a
+ dynamic object, which we do want to handle here. */
+ if (abfd == oldbfd
+ && ((abfd->flags & DYNAMIC) == 0
+ || (h->elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR) == 0))
return true;
/* NEWDYN and OLDDYN indicate whether the new or old symbol,