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
This commit is contained in:
Andrew Turner 2021-09-20 08:55:44 +00:00
parent b831f9ce70
commit b94d360e4a

View File

@ -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