[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#874074: ld.so: TLS relocations against local symbols don't work on powerpc, sparc and sparc64



Control: tags -1 fixed-upstream

On Sat, Sep 02, 2017 at 07:22:23PM +0100, James Clarke wrote:
> Package: libc6
> Version: 2.24-17
> Tags: upstream patch
> Forwarded: https://sourceware.org/ml/libc-alpha/2017-09/msg00120.html
> User: debian-sparc@lists.debian.org
> Usertags: sparc sparc64
> User: debian-powerpc@lists.debian.org
> Usertags: powerpc
> X-Debbugs-Cc: debian-sparc@lists.debian.org, debian-powerpc@lists.debian.org
>
> Hi,
> On the above architectures, TLS relocations against local symbols do not
> work properly, crashing with SIGBUS or SIGSEGV on accessing the variable
> in question. This is only a problem when using gold, as bfd will
> optimise the relocations (since it knows the symbol cannot be pre-empted
> by one in another object) to not refer to a symbol at all. I have
> written a test script, available at [0].
>
> The above patch has been tested on powerpc and sparc64 using my test
> script, as well as on sparc64 using my local experimental GHC with
> native code generation support, where the problem was first seen.
>
> Regards,
> James
>
> [0] http://paste.debian.net/plain/984146

This has now been committed upstream[0] (although only to master, at
least for now). Could you please include this in the next upload?

Regards,
James

[0] https://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=8644588807215ab09716ac04a150f91ac83acffd


Reply to: