Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 11 Oct 2021 12:16:04 GMT
From:      Andrew Turner <andrew@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
Subject:   git: cebda3bec001 - stable/13 - Add ELF macros found in the aaelf64 spec
Message-ID:  <202110111216.19BCG4md049051@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch stable/13 has been updated by andrew:

URL: https://cgit.FreeBSD.org/src/commit/?id=cebda3bec001ae8182fb2f663af5b4d554f842fe

commit cebda3bec001ae8182fb2f663af5b4d554f842fe
Author:     Andrew Turner <andrew@FreeBSD.org>
AuthorDate: 2021-09-20 08:55:44 +0000
Commit:     Andrew Turner <andrew@FreeBSD.org>
CommitDate: 2021-10-11 10:50:42 +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
    
    (cherry picked from commit b94d360e4aa66d626ad5a0acde683ae9a9c71729)
---
 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 76bda8f71f3b..d914ab8d4731 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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202110111216.19BCG4md049051>