Bad patch to elf.c.
Alan Modra
alan@linuxcare.com.au
Tue Oct 10 20:28:00 GMT 2000
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.
More information about the Binutils
mailing list