This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: gold's emission of _GLOBAL_OFFSET_TABLE_
- From: Alan Modra <amodra at bigpond dot net dot au>
- To: Ian Lance Taylor <iant at google dot com>
- Cc: David Miller <davem at davemloft dot net>, binutils at sourceware dot org
- Date: Tue, 8 Apr 2008 09:58:19 +0930
- Subject: Re: gold's emission of _GLOBAL_OFFSET_TABLE_
- References: <20080407.135834.70736146.davem@davemloft.net> <m3y77pw9qn.fsf@google.com>
On Mon, Apr 07, 2008 at 04:01:04PM -0700, Ian Lance Taylor wrote:
> David Miller <davem@davemloft.net> writes:
>
> > I can't tell which one is right, using the .got section index or
> > SHN_ABS, perhaps the choice is arbitrary. Sun's linker seems to
> > behave the same as gold.
>
> I believe the choice is arbitrary. All that really matters is the
> value.
Use the .got section index rather than SHN_ABS if doing so works with
all dynamic loaders of interest. _G_O_T_ being SHN_ABS requires the
dynamic loader relocate SHN_ABS symbols (which is silly) in shared
libraries.
Or even better, use just one section symbol for all local dynamic
relocs.
--
Alan Modra
Australia Development Lab, IBM