diff options
author | Max Filippov <jcmvbkbc@gmail.com> | 2015-07-03 19:51:25 +0300 |
---|---|---|
committer | Waldemar Brodkorb <wbx@openadk.org> | 2015-07-03 18:31:20 -0500 |
commit | 49700fa92a3727e0248fc7c23f6df8486707deb1 (patch) | |
tree | e61ecc01d6a94b3e5e41e193c53ab485b2944c50 /test/tls/tls-macros.h | |
parent | 7d303841dbb6e668e5acdd9218ce82231a00a967 (diff) |
test/tls: xtensa: fix TLS_LD definition
TLS_LD should use linker-provided symbol _TLS_MODULE_BASE_ instead of
symbol it resolves to get thread pointer, otherwise linker relaxation
doesn't work correctly, adding extra offset to thread-local variable
address.
This fixes most of tls/tst-tls* tests.
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
Diffstat (limited to 'test/tls/tls-macros.h')
-rw-r--r-- | test/tls/tls-macros.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/test/tls/tls-macros.h b/test/tls/tls-macros.h index a41aef688..7d8927400 100644 --- a/test/tls/tls-macros.h +++ b/test/tls/tls-macros.h @@ -900,9 +900,9 @@ register void *__gp __asm__("$29"); #define TLS_LD(x) \ ({ int *__l; \ - __asm__ ("movi a8, " #x "@TLSFUNC\n\t" \ - "movi a10, " #x "@TLSARG\n\t" \ - "callx8.tls a8, " #x "@TLSCALL\n\t" \ + __asm__ ("movi a8, _TLS_MODULE_BASE_@TLSFUNC\n\t" \ + "movi a10, _TLS_MODULE_BASE_@TLSARG\n\t" \ + "callx8.tls a8, _TLS_MODULE_BASE_@TLSCALL\n\t" \ "movi %0, " #x "@TPOFF\n\t" \ "add %0, %0, a10\n\t" \ : "=r" (__l) \ |