A bfd patch

H.J. Lu hjl@varesearch.com
Mon Jul 19 09:08:00 GMT 1999


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,


More information about the Binutils mailing list