This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: [SH] TLS IE -> LE optimization issue
- From: Alan Modra <amodra at gmail dot com>
- To: Thomas Schwinge <thomas at codesourcery dot com>
- Cc: binutils at sourceware dot org, Alexandre Oliva <aoliva at redhat dot com>, Kaz Kojima <kkojima at rr dot iij4u dot or dot jp>
- Date: Sat, 14 Apr 2012 09:56:43 +0930
- Subject: Re: [SH] TLS IE -> LE optimization issue
- References: <87obqvpr9l.fsf@schwinge.name>
On Fri, Apr 13, 2012 at 05:48:06PM +0200, Thomas Schwinge wrote:
> That is, we need a __thread variable that is referenced from another
> compilation unit; these two are linked into an executable; and we need a
> (dummy) SO in order to trigger creation of the .dynamic section, etc.
A dummy .so should make no difference to dynamic relocations, so
you've found a bug in the SH allocate_dynrelocs.
elf32-ppc.c allocate_dynrelocs handles this situation by testing
whether the tls symbol is defined in a dynamic library. If not, no
dynamic relocation is allocated and a special GOT entry for local
dynamic TLS syms is used, tlsld_got.
--
Alan Modra
Australia Development Lab, IBM