Use @DTPOFF instead of @TPOFF in TLS_LD as specified by the xtensa ABI.
DTPOFF produces variable offset relative to the variable's module TLS
block, it's the linker's job to replace it with TPOFF and adjust
surrounding code when the object file is linked into an executable.
This fixes tests tls/tst-tls[123] on xtensa that fail if built as PIE.
Signed-off-by: Max Filippov <jcmvbkbc(a)gmail.com>
---
test/tls/tls-macros-xtensa.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/test/tls/tls-macros-xtensa.h b/test/tls/tls-macros-xtensa.h
index 179dc5e57ce5..90fc726f6f6b 100644
--- a/test/tls/tls-macros-xtensa.h
+++ b/test/tls/tls-macros-xtensa.h
@@ -15,7 +15,7 @@
__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" \
+ "movi %0, " #x "@DTPOFF\n\t" \
"add %0, %0, a10\n\t" \
: "=r" (__l) \
: \
@@ -38,7 +38,7 @@
__asm__ ("movi a0, _TLS_MODULE_BASE_@TLSFUNC\n\t" \
"movi a2, _TLS_MODULE_BASE_@TLSARG\n\t" \
"callx0.tls a0, _TLS_MODULE_BASE_@TLSCALL\n\t" \
- "movi %0, " #x "@TPOFF\n\t" \
+ "movi %0, " #x "@DTPOFF\n\t" \
"add %0, %0, a2\n\t" \
: "=r" (__l) \
: \
--
2.30.2
Show replies by date
Hi,
thanks, applied and pushed.
best regards
Waldemar