Page MenuHomeFreeBSD

D50565.1783892871.diff
No OneTemporary

Size
760 B
Referenced Files
None
Subscribers
None

D50565.1783892871.diff

diff --git a/libexec/rtld-elf/rtld.c b/libexec/rtld-elf/rtld.c
--- a/libexec/rtld-elf/rtld.c
+++ b/libexec/rtld-elf/rtld.c
@@ -5434,6 +5434,9 @@
* it is based on tls_last_offset, and TLS offsets here are really TCB
* offsets, whereas libc's tls_static_space is just the executable's static
* TLS segment.
+ *
+ * NB: This differs from NetBSD's ld.elf_so, where TLS offsets are relative to
+ * the end of the TCB.
*/
void *
allocate_tls(Obj_Entry *objs, void *oldtcb, size_t tcbsize, size_t tcbalign)
@@ -5683,7 +5686,7 @@
if (obj->tls_static) {
#ifdef TLS_VARIANT_I
- p = (char *)_tcb_get() + obj->tlsoffset + TLS_TCB_SIZE;
+ p = (char *)_tcb_get() + obj->tlsoffset;
#else
p = (char *)_tcb_get() - obj->tlsoffset;
#endif

File Metadata

Mime Type
text/plain
Expires
Sun, Jul 12, 9:47 PM (2 h, 25 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
29100647
Default Alt Text
D50565.1783892871.diff (760 B)

Event Timeline