aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlorian Weimer <fweimer@redhat.com>2025-01-02 13:45:27 +0100
committerFlorian Weimer <fweimer@redhat.com>2025-01-02 13:45:27 +0100
commit91ee75abcf3f92f63c59fb92a5c5d33bd8988362 (patch)
tree76707a26bd730959d360166d6186927d4a55b6c3
parentceae7e2770302b04a9f9321b66dc8978c9747bd1 (diff)
downloadglibc-91ee75abcf3f92f63c59fb92a5c5d33bd8988362.zip
glibc-91ee75abcf3f92f63c59fb92a5c5d33bd8988362.tar.gz
glibc-91ee75abcf3f92f63c59fb92a5c5d33bd8988362.tar.bz2
s390: Define TLS_DTV_OFFSET instead of GET_ADDR_OFFSET
This will be used in __tls_get_addr to adjust the returned pointer value. Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
-rw-r--r--sysdeps/s390/dl-tls.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/sysdeps/s390/dl-tls.h b/sysdeps/s390/dl-tls.h
index a5c18a6..74756dd 100644
--- a/sysdeps/s390/dl-tls.h
+++ b/sysdeps/s390/dl-tls.h
@@ -24,6 +24,9 @@ typedef struct
unsigned long int ti_offset;
} tls_index;
+/* The DTV stores absolute addresses, but __tls_get_addr must return
+ TP-relative addresses. */
+#define TLS_DTV_OFFSET (-(unsigned long int) __builtin_thread_pointer ())
#ifdef SHARED
@@ -89,9 +92,6 @@ __tls_get_offset:\n\
extern void *__tls_get_addr_internal (tls_index *ti);
# endif /* !IS_IN (rtld) */
-# define GET_ADDR_OFFSET \
- (ti->ti_offset - (unsigned long) __builtin_thread_pointer ())
-
/* Use the privately exported __tls_get_addr_internal instead of
__tls_get_offset in order to avoid the __tls_get_offset special
linkage requiring the GOT pointer to be set up in r12. The