Module Name: src Committed By: joerg Date: Wed Jun 7 13:50:04 UTC 2023
Modified Files: src/libexec/ld.elf_so: tls.c Log Message: TLS variant I archs need to fudge the offset by the size of the TCB. To generate a diff of this commit: cvs rdiff -u -r1.18 -r1.19 src/libexec/ld.elf_so/tls.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/libexec/ld.elf_so/tls.c diff -u src/libexec/ld.elf_so/tls.c:1.18 src/libexec/ld.elf_so/tls.c:1.19 --- src/libexec/ld.elf_so/tls.c:1.18 Sun Jun 4 01:24:56 2023 +++ src/libexec/ld.elf_so/tls.c Wed Jun 7 13:50:04 2023 @@ -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 @@ _rtld_tls_module_allocate(struct tls_tcb } 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