fix ppc32 -msecure-plt TLS relaxation GD->LE

Alexandre Oliva aoliva@redhat.com
Fri Mar 17 07:56:00 GMT 2006


On Mar 14, 2006, Alan Modra <amodra@bigpond.net.au> wrote:

> On Fri, Mar 10, 2006 at 12:09:50AM -0300, Alexandre Oliva wrote:
>> Code compiled with -msecure-plt generates calls to __tls_get_addr with
>> a nonzero addend, that ends up making to the lower part of the TP
>> offset computed for the TL variable when Global Dynamic is relaxed to
>> Local Exec.  This patch fixes it, by arranging for us to refer to the
>> same location in both relocations.  We already did that for LD->LE,
>> but not GD->LE.  [LG[D->IE cancels out the second relocation, so its
>> addend doesn't matter, so I left it along even though it's still
>> conceptually wrong.
>> 
>> Tested on amd64-linux-gnu-x-ppc64-linux-gnu.  Ok to install?

> OK, thanks!  As you say, the GD->IE R_PPC_NONE addend doesn't matter,
> but I think it would be nicer to zero the addend.  Please make that
> change too.

Done, here's what I'm checking in.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: binutils-ppc-TLS-relax-GD-LE.patch
Type: text/x-patch
Size: 2266 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/binutils/attachments/20060317/c66ac143/attachment.bin>
-------------- next part --------------

-- 
Alexandre Oliva         http://www.lsd.ic.unicamp.br/~oliva/
Secretary for FSF Latin America        http://www.fsfla.org/
Red Hat Compiler Engineer   aoliva@{redhat.com, gcc.gnu.org}
Free Software Evangelist  oliva@{lsd.ic.unicamp.br, gnu.org}


More information about the Binutils mailing list