This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: [RFA:] elflink.c: Hide _GLOBAL_OFFSET_TABLE_
- From: Jakub Jelinek <jakub at redhat dot com>
- To: Hans-Peter Nilsson <hans-peter dot nilsson at axis dot com>
- Cc: ebotcazou at libertysurf dot fr, amodra at bigpond dot net dot au, binutils at sources dot redhat dot com
- Date: Wed, 5 Jan 2005 14:57:50 +0100
- Subject: Re: [RFA:] elflink.c: Hide _GLOBAL_OFFSET_TABLE_
- References: <200501051418.11524.ebotcazou@libertysurf.fr> <200501051347.j05DlWrt016556@ignucius.se.axis.com>
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
On Wed, Jan 05, 2005 at 02:47:32PM +0100, Hans-Peter Nilsson wrote:
> Sorry. I wash my hands; those tests are only run if there's a
> gcc (as in "native"), so not run in the cross-test I did, where
> FWIW there were no regressions (and test-results weren't clean
> anyway). IMHO the main relocation situations (certainly this
> one) should be covered by assembler tests as well to ease
> testing of general changes such as this one.
>
> > What's the best approach to fix this?
>
> I'd suggest going back to the orignal patch; make it a bfd hook,
> but defaulting to hidden and override it to default visibility
> for SPARC.
Actually, I think it would be better if it was hidden on all arches,
but SPARC (and other backends that need it) would either unconditionally
or only when needed emitted the STB_LOCAL _GLOBAL_OFFSET_TABLE_ into
.dynsym even when it is not exported. Another alternative would be
to special case dynamic relocations against _GLOBAL_OFFSET_TABLE_,
so that they would be against symbol 0 instead of .got or
_GLOBAL_OFFSET_TABLE_ symbol.
Jakub