This is the mail archive of the binutils@sourceware.cygnus.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: A bfd patch


   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,

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]