Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/libexec/ld.elf_so TLS variant I archs need to fudge the offs...



details:   https://anonhg.NetBSD.org/src/rev/9add8bc9f30b
branches:  trunk
changeset: 376261:9add8bc9f30b
user:      joerg <joerg%NetBSD.org@localhost>
date:      Wed Jun 07 13:50:04 2023 +0000

description:
TLS variant I archs need to fudge the offset by the size of the TCB.

diffstat:

 libexec/ld.elf_so/tls.c |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (27 lines):

diff -r 386e93c3e211 -r 9add8bc9f30b libexec/ld.elf_so/tls.c
--- a/libexec/ld.elf_so/tls.c   Tue Jun 06 23:31:01 2023 +0000
+++ b/libexec/ld.elf_so/tls.c   Wed Jun 07 13:50:04 2023 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: tls.c,v 1.18 2023/06/04 01:24:56 joerg Exp $   */
+/*     $NetBSD: tls.c,v 1.19 2023/06/07 13:50:04 joerg Exp $   */
 /*-
  * Copyright (c) 2011 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -29,7 +29,7 @@
  */
 
 #include <sys/cdefs.h>
-__RCSID("$NetBSD: tls.c,v 1.18 2023/06/04 01:24:56 joerg Exp $");
+__RCSID("$NetBSD: tls.c,v 1.19 2023/06/07 13:50:04 joerg Exp $");
 
 #include <sys/param.h>
 #include <sys/ucontext.h>
@@ -212,7 +212,7 @@ static void *
        }
        if (obj->tls_static) {
 #ifdef __HAVE_TLS_VARIANT_I
-               p = (uint8_t *)tcb + obj->tlsoffset;
+               p = (uint8_t *)tcb + obj->tlsoffset + sizeof(struct tls_tcb);
 #else
                p = (uint8_t *)tcb - obj->tlsoffset;
 #endif



Home | Main Index | Thread Index | Old Index