Bad patch to elf.c.

Alan Modra alan@linuxcare.com.au
Tue Oct 10 21:59:00 GMT 2000


On Tue, 10 Oct 2000, H . J . Lu wrote:

> On Wed, Oct 11, 2000 at 02:28:03PM +1100, Alan Modra wrote:
> > 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.
> > 
> 
> I don't know if I like this patch since it may put way too many
> unnecessary global section name symbols to the dynamic symbol table.
> Please keep in mind there may be many, many, many linkonce sections in
> C++ binaries. At the ia64 ABI meeting, we discussed how to deal with
> running out of the 16bit section index. You can guess how many linkonce
> sections that may imply.

I don't particularly like it either, for the same reason.  Also tcomplex
is bombing for me when linked against a shared libstdc++ :-(  I'm
currently rebuilding gcc using a binutils without the section symbol hacks
to see whether the problem disappears.

The other hack is to change global section syms back to local at some
point during a final link.  We need to treat them as global long enough
to resolve to the kept section, but fudge back to local before they find
their way into the dynamic symbol table.

Alan Modra
-- 
Linuxcare.  Support for the Revolution.




More information about the Binutils mailing list