This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: PATCH: PR 414: Linker crashes with mixed TLS/non-TLS symbols
- From: Alan Modra <amodra at bigpond dot net dot au>
- To: binutils at sources dot redhat dot com
- Date: Fri, 1 Oct 2004 21:13:31 +0930
- Subject: Re: PATCH: PR 414: Linker crashes with mixed TLS/non-TLS symbols
- References: <200409221737.06059.pluto@pld-linux.org> <20040922155522.GB12940@lucon.org> <200409221827.29089.pluto@pld-linux.org> <20040929164702.GA21672@lucon.org> <20040929173833.GA22511@lucon.org> <20040929222111.A1524@fw.j-son.org> <20041001013106.GA20038@lucon.org>
On Thu, Sep 30, 2004 at 06:31:06PM -0700, H. J. Lu wrote:
> On Wed, Sep 29, 2004 at 10:21:11PM +0200, Christian Joensson wrote:
> > Is this patch related also to the tls problems on sparc/sparc64?
>
> I don't know.
The patch introduced some new sparc failures, which I've just fixed.
I've also fixed one of the sparc failures that has been around for quite
a while. The remaining failure,
BFD 2.15.92 20041001 assertion fail /src/binutils-current/bfd/elf32-sparc.c:2485
tmpdir/tlssunnopic32.o: probably compiled without -fPIC?
final link failed: Bad value
FAIL: TLS -fno-pic -shared
is a result of Jakub's patch to reduce section symbols. tlssunnopic32.s
references _GLOBAL_OFFSET_TABLE_ as follows:
.hidden _GLOBAL_OFFSET_TABLE_
sethi %hi(_GLOBAL_OFFSET_TABLE_), %l1
or %l1, %lo(_GLOBAL_OFFSET_TABLE_), %l1
The linker wants to reduce the relocs to a section symbol since
_GLOBAL_OFFSET_TABLE is marked hidden, ie. local, but the .got section
symbol has been removed. I don't know enough about sparc to know
whether this failure is important, or to decide which of several
possible solutions is correct.
--
Alan Modra
IBM OzLabs - Linux Technology Centre