public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
* A bfd patch
@ 1999-07-19  9:08 H.J. Lu
  1999-07-19 11:22 ` Ian Lance Taylor
  0 siblings, 1 reply; 3+ messages in thread
From: H.J. Lu @ 1999-07-19  9:08 UTC (permalink / raw)
  To: alan; +Cc: venom, Ian Lance Taylor, binutils

Hi, Ian,

I believe this patch fixes the i386-pc-linux-gnulibc1 problem. Alan,
venom@cibs9.sns.it, could you please check it out?

Thanks.


-- 
H.J. Lu (hjl@gnu.org)
----
Mon Jul 19 09:03:40 1998  H.J. Lu  (hjl@gnu.org)

	* elflink.h (elf_merge_symbol): Allow _GLOBAL_OFFSET_TABLE_
	and _DYNAMIC to override themselves.

Index: elflink.h
===================================================================
RCS file: /work/cvs/gnu/binutils/bfd/elflink.h,v
retrieving revision 1.1.1.6
diff -u -p -r1.1.1.6 elflink.h
--- elflink.h	1999/07/17 20:52:28	1.1.1.6
+++ elflink.h	1999/07/19 16:02:38
@@ -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. _DYNAMIC and _GLOBAL_OFFSET_TABLE_ are special cases
+     here. We have to allow them since the shared libraries generated
+     by the older linker, like libc.so from the Linux C library 5,
+     may need it. */
+  if (abfd == oldbfd && strcmp (name, "_DYNAMIC")
+      && strcmp (name, "_GLOBAL_OFFSET_TABLE_"))
     return true;
 
   /* NEWDYN and OLDDYN indicate whether the new or old symbol,

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: A bfd patch
  1999-07-19  9:08 A bfd patch H.J. Lu
@ 1999-07-19 11:22 ` Ian Lance Taylor
  1999-07-19 11:48   ` H.J. Lu
  0 siblings, 1 reply; 3+ messages in thread
From: Ian Lance Taylor @ 1999-07-19 11:22 UTC (permalink / raw)
  To: hjl; +Cc: alan, venom, binutils

   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,

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: A bfd patch
  1999-07-19 11:22 ` Ian Lance Taylor
@ 1999-07-19 11:48   ` H.J. Lu
  0 siblings, 0 replies; 3+ messages in thread
From: H.J. Lu @ 1999-07-19 11:48 UTC (permalink / raw)
  To: Ian Lance Taylor; +Cc: alan, venom, binutils

> 
>    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?
> 

Thanks. It works for my testcase.


H.J.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~1999-07-19 11:48 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1999-07-19  9:08 A bfd patch H.J. Lu
1999-07-19 11:22 ` Ian Lance Taylor
1999-07-19 11:48   ` H.J. Lu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).