[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

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

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.


[0] http://paste.debian.net/plain/984146

Reply to: