From nobody Thu Jan 18 22:25:55 2024 X-Original-To: dev-commits-src-branches@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 4TGHQD38svz578Qp; Thu, 18 Jan 2024 22:25:56 +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 4TGHQD0W2kz40yN; Thu, 18 Jan 2024 22:25:56 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705616756; 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=eTeFt5K7bAB7GK/NH/Q0N2V4YyoDW2gYouMMCBnUcH0=; b=l1H73Yw4U4a8UdIoXWTGin6WBRbQ/1i8dehqWndkNXiXl6YvsTvV/Ag4uqH1gbHDWmfqwA tvvyNhAQuLMAdVxIwW9GJw2cj2NzxWyINFYRnSG++PD6zeKnAmfn7W/lzq30KAjrVBXBv3 HYvhiXaTf/XrI4EgjazQtpLIhOsXEW+IgtSp/kzbuRFBPidVla5ZVALgsX+PBclRApQU1J 80JKinQZVOdtU6RoY4Ktd6xUXDYWHLM4Bfvmh8476WmlJPdrr9JuMzKvF7OhGriKu4PdpF DHj8BWqIQNoiC+w0oV+g8zon2Noqj+whDvHrq/sujtq2ZI24mC9vdVDu6RFNlg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705616756; 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=eTeFt5K7bAB7GK/NH/Q0N2V4YyoDW2gYouMMCBnUcH0=; b=MuvWB53sJuaB1y+cirUQMMocfcRTogEPYpJ9cZe6B6nop/wdODC44oJPumoZay6pSc9jf5 vDPrQvZGSR7DAqLLO17NFY/EYYFVJS2B+80e0+osH4NNW2sCSRLAQ+guZQ32EWMnZ3JIW4 Id7hUeJeMUSIYYt0RF4cePYg8kKWLxGkXE9kbLfeF574tbaqsFMFXgcB0S01Vt2MeLVw81 4xY/UxT774hhBwO7j/GhehfFbHdrULW/XPDz2cxkQLGH3+V/UKHXdmOVT9UuMw7qNyuamw 7L8FYOTc4hc0s1+Z4hrNbkO97Gq/hUVuOnxi43HfXHrg4pH8Qsdq8ZEeabDy8g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1705616756; a=rsa-sha256; cv=none; b=Ajs1B5aoJU3O8GRT0oBVLzAgIXRsslf1SuNoyw7HJHeKwZPtiF/wqpeqpAH75+7u4FrBXz SoxZPJjV9EP1quFKEU8xZklWHBljDPGTezSgAhoiJla7GX9E7WEkm9tF63tLuHXmbvr6pc +xr5BpXzKTkP7/iGSvLdDtbb4sZhxqS+p44/5tsatwKtQHmlO0svDyxBVuaRTQYP59atc/ X/qFd6B9SGmAy7limgyCYk0Xqg+LlJnLkNW77iL0NV8v4gi4RW6bYhky2bsmNo6Lg9V6x2 s0HkH6nPmfNr0BfApGlr9Ht3IR1/Hck5BHTPGCxfpRA3B7htO6CZDYRDcdqejQ== 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 4TGHQC6F8nzQWc; Thu, 18 Jan 2024 22:25:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 40IMPtCd089287; Thu, 18 Jan 2024 22:25:55 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40IMPtFN089285; Thu, 18 Jan 2024 22:25:55 GMT (envelope-from git) Date: Thu, 18 Jan 2024 22:25:55 GMT Message-Id: <202401182225.40IMPtFN089285@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: 156b0d23dcd5 - stable/14 - kldxref: Implement aarch64 R_AARCH64_AB64 relocation List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@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/stable/14 X-Git-Reftype: branch X-Git-Commit: 156b0d23dcd57cd7bba7d0544133e8f32559a2ac Auto-Submitted: auto-generated The branch stable/14 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=156b0d23dcd57cd7bba7d0544133e8f32559a2ac commit 156b0d23dcd57cd7bba7d0544133e8f32559a2ac Author: Jessica Clarke AuthorDate: 2023-12-14 20:17:20 +0000 Commit: John Baldwin CommitDate: 2024-01-18 21:30:48 +0000 kldxref: Implement aarch64 R_AARCH64_AB64 relocation Doing nothing seems to be sufficient but is strange, inconsistent with other architectures, and not necessary when it's easy to support properly. (cherry picked from commit aaba1490ec4b17dea750b1e58dfded7aeb4e9816) --- usr.sbin/kldxref/ef_aarch64.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/usr.sbin/kldxref/ef_aarch64.c b/usr.sbin/kldxref/ef_aarch64.c index f1e499e76ef1..4365a7ff1f66 100644 --- a/usr.sbin/kldxref/ef_aarch64.c +++ b/usr.sbin/kldxref/ef_aarch64.c @@ -43,8 +43,8 @@ ef_aarch64_reloc(struct elf_file *ef, const void *reldata, Elf_Type reltype, GElf_Addr relbase, GElf_Addr dataoff, size_t len, void *dest) { char *where; - Elf64_Addr addend; - GElf_Size rtype; + GElf_Addr addr, addend; + GElf_Size rtype, symidx; const GElf_Rela *rela; if (reltype != ELF_T_RELA) @@ -54,6 +54,7 @@ ef_aarch64_reloc(struct elf_file *ef, const void *reldata, Elf_Type reltype, where = (char *)dest - dataoff + rela->r_offset; addend = rela->r_addend; rtype = GELF_R_TYPE(rela->r_info); + symidx = GELF_R_SYM(rela->r_info); if (where < (char *)dest || where >= (char *)dest + len) return (0); @@ -63,6 +64,8 @@ ef_aarch64_reloc(struct elf_file *ef, const void *reldata, Elf_Type reltype, le64enc(where, relbase + addend); break; case R_AARCH64_ABS64: + addr = EF_SYMADDR(ef, symidx) + addend; + le64enc(where, addr); break; default: warnx("unhandled relocation type %d", (int)rtype);