aboutsummaryrefslogtreecommitdiff
path: root/sysdeps
diff options
context:
space:
mode:
authorFlorian Weimer <fweimer@redhat.com>2025-01-09 19:30:44 +0100
committerFlorian Weimer <fweimer@redhat.com>2025-01-09 19:30:44 +0100
commitd1da011118ad8e35002034128458355a2de570ef (patch)
tree697fb370500477b36b8b061f945bd413b86e4539 /sysdeps
parent9b71570c465a38cc19c3362526048c7dcfc999e6 (diff)
downloadglibc-d1da011118ad8e35002034128458355a2de570ef.zip
glibc-d1da011118ad8e35002034128458355a2de570ef.tar.gz
glibc-d1da011118ad8e35002034128458355a2de570ef.tar.bz2
elf: Always define TLS_TP_OFFSET
This will be needed to compute __rseq_offset outside of the TLS relocation machinery. Reviewed-by: Michael Jeanson <mjeanson@efficios.com>
Diffstat (limited to 'sysdeps')
-rw-r--r--sysdeps/generic/dl-tls.h3
-rw-r--r--sysdeps/i386/dl-tls.h3
-rw-r--r--sysdeps/s390/dl-tls.h3
-rw-r--r--sysdeps/x86_64/x32/dl-tls.h3
4 files changed, 12 insertions, 0 deletions
diff --git a/sysdeps/generic/dl-tls.h b/sysdeps/generic/dl-tls.h
index 8aff4b6..e9480f1 100644
--- a/sysdeps/generic/dl-tls.h
+++ b/sysdeps/generic/dl-tls.h
@@ -33,4 +33,7 @@ extern void *__tls_get_addr (tls_index *ti);
TLS block. */
#define TLS_DTV_OFFSET 0
+/* Static TLS offsets are relative to the unadjusted thread pointer. */
+#define TLS_TP_OFFSET 0
+
#endif /* _DL_TLS_H */
diff --git a/sysdeps/i386/dl-tls.h b/sysdeps/i386/dl-tls.h
index eed1832..2dac81b 100644
--- a/sysdeps/i386/dl-tls.h
+++ b/sysdeps/i386/dl-tls.h
@@ -28,6 +28,9 @@ typedef struct dl_tls_index
TLS block. */
#define TLS_DTV_OFFSET 0
+/* Static TLS offsets are relative to the unadjusted thread pointer. */
+#define TLS_TP_OFFSET 0
+
#ifdef SHARED
/* This is the prototype for the GNU version. */
extern void *___tls_get_addr (tls_index *ti)
diff --git a/sysdeps/s390/dl-tls.h b/sysdeps/s390/dl-tls.h
index 74756dd..53fd362 100644
--- a/sysdeps/s390/dl-tls.h
+++ b/sysdeps/s390/dl-tls.h
@@ -28,6 +28,9 @@ typedef struct
TP-relative addresses. */
#define TLS_DTV_OFFSET (-(unsigned long int) __builtin_thread_pointer ())
+/* Static TLS offsets are relative to the unadjusted thread pointer. */
+#define TLS_TP_OFFSET 0
+
#ifdef SHARED
extern unsigned long __tls_get_offset (unsigned long got_offset);
diff --git a/sysdeps/x86_64/x32/dl-tls.h b/sysdeps/x86_64/x32/dl-tls.h
index 4b736a4..04ac0fe 100644
--- a/sysdeps/x86_64/x32/dl-tls.h
+++ b/sysdeps/x86_64/x32/dl-tls.h
@@ -35,4 +35,7 @@ extern void *__tls_get_addr (tls_index *ti);
TLS block. */
#define TLS_DTV_OFFSET 0
+/* Static TLS offsets are relative to the unadjusted thread pointer. */
+#define TLS_TP_OFFSET 0
+
#endif /* _X86_64_DL_TLS_H */