From nobody Thu Dec 09 21:23:39 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 5545618D0971; Thu, 9 Dec 2021 21:23:41 +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 4J96Tm1hGSz3K8L; Thu, 9 Dec 2021 21:23:40 +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 09C0460EB; Thu, 9 Dec 2021 21:23:40 +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 1B9LNdiH046971; Thu, 9 Dec 2021 21:23:39 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1B9LNdk1046970; Thu, 9 Dec 2021 21:23:39 GMT (envelope-from git) Date: Thu, 9 Dec 2021 21:23:39 GMT Message-Id: <202112092123.1B9LNdk1046970@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: 23e0c0e9a3e0 - main - mips: Add TLS_DTV_OFFSET to the result of tls_get_addr_common. 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: 23e0c0e9a3e0c73169c2aa90e26bb5cb35f1aa2f Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1639085020; 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=exUksQ5hfYQLNLlPnCZDft8kaUZjlNWrNMhJPISFwE8=; b=YHkjRJiMWxkBmxUE0atasi/xQcnRnt5CaGcdIQUkOkNW5hesow9G9atKmfgqsvdQ+CLzwh HkpIoMNTrABDbInJeApSS0faTqExMNreLvDBUjAatRzEOktMAjM6M87AkbaTEW4RpVvDZS Q6radZLS3LOLsC55uYvA5jqjxty6/nr53rnpd9gqkXSqLOYIocl6Ng2Wkjcq/Nsq5F7E8b PfAOBU5ai5sKIkJbl41ypqyTYRZpbUyChiOj8Hwk0myUlKogGWdvPQfh+9jOIbKjweDspM GXn39BYcNUrw0S6Gd4vGufqQwbGj899N3Pe6wAFpagHB2sJ+K4E8MYYPTTs2OQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1639085020; a=rsa-sha256; cv=none; b=LEd3V+JQf5aPLD+LHAf70lhUAursmyLQa+Q2dd3mWPT5VkyBnKcS/wNQlyEgoTuonGdCui cJgEgWYPobRI7pPrVYrIqrf5deZsa0at9heNG6GiEz8URm6Ny3G736v1gonirdkPSLa3Mt NgYAfM8DqBhDuHwkLg0xnbfpa69FLxkCIN6MWN5Gnj31J2262iXam3ghK9MF5/2GbR97hQ 5SZHlIvWONnhU3P/Wg6qe+dWPbw+mWrD67oGDd8AF/w6e15z1vCziuhfpLUsmBDZxLRhm3 XJBqzUz8exEsUhXv4Oem+HhDL5KfDI09oD2NjEZBs0XDDDUdAawmGwdgE/+qdA== 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=23e0c0e9a3e0c73169c2aa90e26bb5cb35f1aa2f commit 23e0c0e9a3e0c73169c2aa90e26bb5cb35f1aa2f Author: John Baldwin AuthorDate: 2021-12-09 21:16:19 +0000 Commit: John Baldwin CommitDate: 2021-12-09 21:16:19 +0000 mips: Add TLS_DTV_OFFSET to the result of tls_get_addr_common. Previously TLS_DTV_OFFSET was added to the offset passed to tls_get_addr_common; however, this approach matches powerpc and RISC-V and better matches the intention. Reviewed by: kib, jrtc27 Sponsored by: The University of Cambridge, Google Inc. Differential Revision: https://reviews.freebsd.org/D33347 --- libexec/rtld-elf/mips/reloc.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/libexec/rtld-elf/mips/reloc.c b/libexec/rtld-elf/mips/reloc.c index d870b8a1952c..a39a96e20b00 100644 --- a/libexec/rtld-elf/mips/reloc.c +++ b/libexec/rtld-elf/mips/reloc.c @@ -783,8 +783,7 @@ __tls_get_addr(tls_index* ti) char *p; tls = _get_tp(); - p = tls_get_addr_common(tls, ti->ti_module, ti->ti_offset + - TLS_DTV_OFFSET); + p = tls_get_addr_common(tls, ti->ti_module, ti->ti_offset); - return (p); + return (p + TLS_DTV_OFFSET); }