Page MenuHomeFreeBSD

D31541.id93739.diff
No OneTemporary

D31541.id93739.diff

diff --git a/lib/libc/gen/tls.c b/lib/libc/gen/tls.c
--- a/lib/libc/gen/tls.c
+++ b/lib/libc/gen/tls.c
@@ -81,12 +81,6 @@
#error TLS_TCB_ALIGN undefined for target architecture
#endif
-#if defined(__mips__) || defined(__powerpc__) || defined(__riscv)
-#define DTV_OFFSET 0x8000
-#else
-#define DTV_OFFSET 0
-#endif
-
#ifndef PIC
static size_t libc_tls_static_space;
@@ -289,7 +283,7 @@
/* Adjust the DTV. */
dtv = tcb[0];
- dtv[2] = (Elf_Addr)(tls + DTV_OFFSET);
+ dtv[2] = (Elf_Addr)(tls + TLS_DTV_OFFSET);
} else {
dtv = __je_bootstrap_malloc(3 * sizeof(Elf_Addr));
if (dtv == NULL) {
@@ -300,7 +294,7 @@
tcb[0] = dtv;
dtv[0] = 1; /* Generation. */
dtv[1] = 1; /* Segments count. */
- dtv[2] = (Elf_Addr)(tls + DTV_OFFSET);
+ dtv[2] = (Elf_Addr)(tls + TLS_DTV_OFFSET);
if (libc_tls_init_size > 0)
memcpy(tls, libc_tls_init, libc_tls_init_size);

File Metadata

Mime Type
text/plain
Expires
Sun, Feb 23, 11:25 PM (9 h, 58 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
16806547
Default Alt Text
D31541.id93739.diff (896 B)

Event Timeline