git: b94d360e4aa6 - main - Add ELF macros found in the aaelf64 spec
Andrew Turner
andrew at FreeBSD.org
Mon Sep 20 10:58:23 UTC 2021
The branch main has been updated by andrew:
URL: https://cgit.FreeBSD.org/src/commit/?id=b94d360e4aa66d626ad5a0acde683ae9a9c71729
commit b94d360e4aa66d626ad5a0acde683ae9a9c71729
Author: Andrew Turner <andrew at FreeBSD.org>
AuthorDate: 2021-09-20 08:55:44 +0000
Commit: Andrew Turner <andrew at FreeBSD.org>
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
More information about the dev-commits-src-main
mailing list