From nobody Thu Dec 09 21:23:38 2021 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 7D1EA18D0D81; Thu, 9 Dec 2021 21:23:39 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4J96Tk6zBXz3K8D; Thu, 9 Dec 2021 21:23:38 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D090F60EA; Thu, 9 Dec 2021 21:23:38 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 1B9LNcRI046947; Thu, 9 Dec 2021 21:23:38 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1B9LNcc2046946; Thu, 9 Dec 2021 21:23:38 GMT (envelope-from git) Date: Thu, 9 Dec 2021 21:23:38 GMT Message-Id: <202112092123.1B9LNcc2046946@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: 03f6b141068e - main - mips: Rename TLS_DTP_OFFSET to TLS_DTV_OFFSET. List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 03f6b141068ee7f1004ebfc76242cf951494b7d2 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1639085019; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=EyCenyDrm6JujOrIV5Z0v+CK0chmJxV9ApwtxMFQRlI=; b=ZKrQxDEoWnm08rWjqU6cRKOHeFbhryyLiXXBS/gvnnmX/F+PwB1HfSi0fmDkS7Zi+r/S9O 4Rhriy/uxPAGwhPGEsgbIPWKQ6V13Gq8i+QaXlLppC6iXAnj8HhJ44gn3viYX11YiFKtNo j+NXLiSl/oINfOt7/KmCDjAcI5dGxgDEI3vo3+M4JmYMl+1l7xxcOMV5MFQHSPKJ433sO8 bL+0h9hSNqv7of6YvYHD7zZZTKXBTEuVU2/pvOprSyZi4EPP1hlsyTvB4Qk6zxo35QqNes NrIrgQsNlpS7sVFVZIK/CvTIGGnbgqKJdXq7Rc+P5IUOh3dHqyb+2KD647h+Cw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1639085019; a=rsa-sha256; cv=none; b=Vku/WNUkCoLFSuSyiVsptt0TEOY+hVFsW4wX51iruV5Y4IttbS5dSULG7TinVH/urlBcH2 dbgHOzQDp7zR5FxZD7tvtOvn3B6uM6KLhiEN4GHxh/5Opj9B86qUd/sWHoOlZryfhQA7Ck 7bL36g0UST1PdD7fxa+0JWdD0Wdm18U26coaeVaXep4iak7SQAN4GHRqaK8acAVq0X9RVP 5EPkeFvIN1M43R8NrBG3ncIdCobfQ66CG2/zfEj7DA+jYJYMwlRisCRuq2gA2EhokefclH eLUdajbJgaa4SReN9k0mXtgIwo3S3nQ1F6EOzhs80Lnjp705Ig8A0KluS9gSxQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=03f6b141068ee7f1004ebfc76242cf951494b7d2 commit 03f6b141068ee7f1004ebfc76242cf951494b7d2 Author: John Baldwin AuthorDate: 2021-12-09 21:16:00 +0000 Commit: John Baldwin CommitDate: 2021-12-09 21:16:00 +0000 mips: Rename TLS_DTP_OFFSET to TLS_DTV_OFFSET. This is the more standard name for the bias of dtv pointers used on other platforms. This also fixes a few other places that were using the wrong bias previously on MIPS such as dlpi_tls_data in struct dl_phdr_info and the recently added __libc_tls_get_addr(). Reviewed by: kib, jrtc27 Sponsored by: The University of Cambridge, Google Inc. Differential Revision: https://reviews.freebsd.org/D33346 --- libexec/rtld-elf/mips/reloc.c | 4 ++-- libexec/rtld-elf/mips/rtld_machdep.h | 1 - sys/mips/include/tls.h | 2 +- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/libexec/rtld-elf/mips/reloc.c b/libexec/rtld-elf/mips/reloc.c index 44ecbd66a707..d870b8a1952c 100644 --- a/libexec/rtld-elf/mips/reloc.c +++ b/libexec/rtld-elf/mips/reloc.c @@ -591,7 +591,7 @@ reloc_non_plt(Obj_Entry *obj, Obj_Entry *obj_rtld, int flags, if (!defobj->tls_done && !allocate_tls_offset(obj)) return -1; - val += (Elf_Addr)def->st_value - TLS_DTP_OFFSET; + val += (Elf_Addr)def->st_value - TLS_DTV_OFFSET; store_ptr(where, val, rlen); dbg("DTPREL %s in %s %p --> %p in %s", @@ -784,7 +784,7 @@ __tls_get_addr(tls_index* ti) tls = _get_tp(); p = tls_get_addr_common(tls, ti->ti_module, ti->ti_offset + - TLS_DTP_OFFSET); + TLS_DTV_OFFSET); return (p); } diff --git a/libexec/rtld-elf/mips/rtld_machdep.h b/libexec/rtld-elf/mips/rtld_machdep.h index 0cb56290152e..eac122beaa46 100644 --- a/libexec/rtld-elf/mips/rtld_machdep.h +++ b/libexec/rtld-elf/mips/rtld_machdep.h @@ -78,6 +78,5 @@ extern void *__tls_get_addr(tls_index *ti); #define md_abi_variant_hook(x) #define TLS_VARIANT_I 1 -#define TLS_DTV_OFFSET 0 #endif diff --git a/sys/mips/include/tls.h b/sys/mips/include/tls.h index 19743d9a7883..c71507b773b0 100644 --- a/sys/mips/include/tls.h +++ b/sys/mips/include/tls.h @@ -39,7 +39,7 @@ */ #define TLS_TP_OFFSET 0x7000 -#define TLS_DTP_OFFSET 0x8000 +#define TLS_DTV_OFFSET 0x8000 #ifdef __mips_n64 #define TLS_TCB_SIZE 16