From nobody Thu Feb 02 20:07:35 2023 X-Original-To: dev-commits-src-all@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 4P78w72c5hz3kWp9; Thu, 2 Feb 2023 20:07:35 +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 4P78w722F9z4H2f; Thu, 2 Feb 2023 20:07:35 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1675368455; 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=EJpvE8p+2Lfnuqw0GA2WcgadN9Fh99dDfOkHt3rqU6U=; b=wa7DgKj/AUhUsDL5LEo2NhrVb3tLugpBErAXN5wz1K6xPMqTzpMtI6mNOFBf/68kKbqcpF vLUZJ4DLSDF8SAqslfgFuATaKxNrJD6ehwWmn4shr2JOI6TM4DDtTSRKEmYGglnDtU5DVY ufc1egJ0KvjWGhLk1hT+8c2KAakmdQp4zPx9bFy514MfnF9mV+BSFVwfc7DYuN5XMQIe+h eaRou6VcvUfelFduoB70eqiBmJbIWnVfW2uWhMHJY51NuugFJfq/b+JYEth8pTSTerPY4T 3aFT2/trIbNCHvS2Gtf2nt6BDKMWhyChEZ78W8EFESnez/oyakmhiOX+sGdYdQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1675368455; 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=EJpvE8p+2Lfnuqw0GA2WcgadN9Fh99dDfOkHt3rqU6U=; b=CDAfLBB/XHUAVCdP5JwSKlggDvjD8V2d3+5vmQMC1n8IBO7k3WshbB0cEP6gS/LxFgsKG4 FYH4bWtFCCDZ2707EtCuw49YKJhxZvMchAD/4Kbw3QsfBbHIITpE56PuG9mC0w0srBcSKe zgdIlU/tDUDsPvquStuxQXcySA8Pg1tzfTy9lLvU6Sxxw5sh4++rMlQevp39kdZh/sGaeJ KnPq9wQU/ULOE5GBc5fOs4WZctSmYsl/9Xyknu1pcRqgl7IG30FOHUtpKD70QD+b8wRSSe gWAa1jrwJZPMii9uqrqcuf+pNMpvdUfqzTCR0RZV8qooi1KqLTCGxVkVGkl9gw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1675368455; a=rsa-sha256; cv=none; b=WLi4YS10i5ffMVbdyZDps+32F7SyG3q3HmANQ6N1YcK4pXVZFL1cOplhxUkDVZLnQ8VVsk hktey1k5fMLZbcY1vts9QgtzXkiCBAV3sGsN1dKAwml+XQUmR9lIB8zwATsZVLByVUuIGu CMKpJFxlZhL+fdFpAT7VwXKweeWMhGHvKdEyVMjAIla1p2RcesD4hTtbGJ0RGaQTayRekz /JMA5bohjLLYi60hagjBdbBVmpjCf7fZAS7O7LIwTkCwsweEEKdFBOMv1C/Y3QKZGa6S5Z +0yHVgrVtHLDbFkgS2uqa30axQEvgDhhZJBgUJsn/8QYu8FOK+Se+MKTEpioyA== 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 4P78w70yJlz171Q; Thu, 2 Feb 2023 20:07:35 +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 312K7ZFG036041; Thu, 2 Feb 2023 20:07:35 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 312K7ZvP036040; Thu, 2 Feb 2023 20:07:35 GMT (envelope-from git) Date: Thu, 2 Feb 2023 20:07:35 GMT Message-Id: <202302022007.312K7ZvP036040@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: ce18e1939438 - main - stand: only compute symidx on x86 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: ce18e1939438eb4160c6b7d91437a90393eba9ac Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=ce18e1939438eb4160c6b7d91437a90393eba9ac commit ce18e1939438eb4160c6b7d91437a90393eba9ac Author: Warner Losh AuthorDate: 2023-02-02 20:03:10 +0000 Commit: Warner Losh CommitDate: 2023-02-02 20:04:05 +0000 stand: only compute symidx on x86 We only use symidx on x86, so only compute it on x86 to fix a set but not used warning on aarch64. Sponsored by: Netflix Reviewed by: kevans Differential Revision: https://reviews.freebsd.org/D38246 --- stand/common/reloc_elf.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/stand/common/reloc_elf.c b/stand/common/reloc_elf.c index 262091b9f6c6..f143b20eee5c 100644 --- a/stand/common/reloc_elf.c +++ b/stand/common/reloc_elf.c @@ -56,7 +56,10 @@ __elfN(reloc)(struct elf_file *ef, symaddr_fn *symaddr, const void *reldata, __ELF_WORD_SIZE == 64 Elf64_Addr *where, val; Elf_Addr addend, addr; - Elf_Size rtype, symidx; + Elf_Size rtype; +#if defined(__amd64__) || defined(__i386__) + Elf_Size symidx; +#endif const Elf_Rel *rel; const Elf_Rela *rela; @@ -67,7 +70,9 @@ __elfN(reloc)(struct elf_file *ef, symaddr_fn *symaddr, const void *reldata, dataaddr); addend = 0; rtype = ELF_R_TYPE(rel->r_info); +#if defined(__amd64__) || defined(__i386__) symidx = ELF_R_SYM(rel->r_info); +#endif addend = 0; break; case ELF_RELOC_RELA: @@ -76,7 +81,9 @@ __elfN(reloc)(struct elf_file *ef, symaddr_fn *symaddr, const void *reldata, dataaddr); addend = rela->r_addend; rtype = ELF_R_TYPE(rela->r_info); +#if defined(__amd64__) || defined(__i386__) symidx = ELF_R_SYM(rela->r_info); +#endif break; default: return (EINVAL);