[RFA:] elflink.c: Hide _GLOBAL_OFFSET_TABLE_
Jakub Jelinek
jakub@redhat.com
Wed Jan 5 13:58:00 GMT 2005
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
More information about the Binutils
mailing list