This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: Bad patch to elf.c.
- To: "H . J . Lu" <hjl at lucon dot org>
- Subject: Re: Bad patch to elf.c.
- From: Alan Modra <alan at linuxcare dot com dot au>
- Date: Wed, 11 Oct 2000 14:28:03 +1100 (EST)
- cc: Timothy Alan Chandler <fusion at heavywater dot net>, binutils at sourceware dot cygnus dot com
This appears to do the trick. Rather than hacking global sections syms
back to local, I decided to hack the symbol type, as this is probably a
safer change. Not installed yet. Can someone check what this does to
sparc32 and sparc64?
bfd/ChangeLog
* elflink.h (elf_link_add_object_symbols): Hack global section
syms to STT_NOTYPE.
Index: elflink.h
===================================================================
RCS file: /cvs/src/src/bfd/elflink.h,v
retrieving revision 1.73
diff -u -p -r1.73 elflink.h
--- elflink.h 2000/10/07 13:40:33 1.73
+++ elflink.h 2000/10/11 02:55:41
@@ -1368,11 +1368,17 @@ elf_link_add_object_symbols (abfd, info)
}
else if (bind == STB_GLOBAL)
{
+ if (ELF_ST_TYPE (sym.st_info) == STT_SECTION
+ && ! info->relocateable)
+ {
+ /* Hack alert! The glibc dynamic linker as of 2000-10-10
+ ignores all symbol types > STT_FUNC. Fudge section
+ symbols here on a final link. */
+ sym.st_info = ELF_ST_INFO (STB_GLOBAL, STT_NOTYPE);
+ }
if (sym.st_shndx != SHN_UNDEF
&& sym.st_shndx != SHN_COMMON)
flags = BSF_GLOBAL;
- else
- flags = 0;
}
else if (bind == STB_WEAK)
flags = BSF_WEAK;
Alan Modra
--
Linuxcare. Support for the Revolution.