From owner-dev-commits-src-all@freebsd.org Mon Sep 20 10:58:23 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id C18E867CF02; Mon, 20 Sep 2021 10:58:23 +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 4HChPC4XCNz4sbZ; Mon, 20 Sep 2021 10:58:23 +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 7C066751F; Mon, 20 Sep 2021 10:58:23 +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 18KAwNcZ061008; Mon, 20 Sep 2021 10:58:23 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 18KAwNqh061007; Mon, 20 Sep 2021 10:58:23 GMT (envelope-from git) Date: Mon, 20 Sep 2021 10:58:23 GMT Message-Id: <202109201058.18KAwNqh061007@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Andrew Turner Subject: git: b94d360e4aa6 - main - Add ELF macros found in the aaelf64 spec MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: andrew X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: b94d360e4aa66d626ad5a0acde683ae9a9c71729 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Sep 2021 10:58:23 -0000 The branch main has been updated by andrew: URL: https://cgit.FreeBSD.org/src/commit/?id=b94d360e4aa66d626ad5a0acde683ae9a9c71729 commit b94d360e4aa66d626ad5a0acde683ae9a9c71729 Author: Andrew Turner AuthorDate: 2021-09-20 08:55:44 +0000 Commit: Andrew Turner CommitDate: 2021-09-20 10:34:04 +0000 Add ELF macros found in the aaelf64 spec The arm64 aaelf64 spec [0] has DT_AARCH64_ that could be used with dynamic linking. It also adds GNU_PROPERTY_AARCH64_FEATURE_1_AND used to tell the kernel which CPU features the binary is compatible with, but does not require to execute correctly. Add these values so the kernel and elf tools can make use of them. [0] https://github.com/ARM-software/abi-aa/blob/2021Q1/aaelf64/aaelf64.rst Sponsored by: The FreeBSD Foundation --- sys/sys/elf_common.h | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/sys/sys/elf_common.h b/sys/sys/elf_common.h index d362f51ed833..4df2751b07cf 100644 --- a/sys/sys/elf_common.h +++ b/sys/sys/elf_common.h @@ -678,6 +678,10 @@ typedef struct { #define DT_LOPROC 0x70000000 /* First processor-specific type. */ +#define DT_AARCH64_BTI_PLT 0x70000001 +#define DT_AARCH64_PAC_PLT 0x70000003 +#define DT_AARCH64_VARIANT_PCS 0x70000005 + #define DT_ARM_SYMTABSZ 0x70000001 #define DT_ARM_PREEMPTMAP 0x70000002 @@ -829,6 +833,11 @@ typedef struct { #define GNU_PROPERTY_LOPROC 0xc0000000 #define GNU_PROPERTY_HIPROC 0xdfffffff +#define GNU_PROPERTY_AARCH64_FEATURE_1_AND 0xc0000000 + +#define GNU_PROPERTY_AARCH64_FEATURE_1_BTI 0x00000001 +#define GNU_PROPERTY_AARCH64_FEATURE_1_PAC 0x00000002 + #define GNU_PROPERTY_X86_FEATURE_1_AND 0xc0000002 #define GNU_PROPERTY_X86_FEATURE_1_IBT 0x00000001