diff mbox series

[02/12] elf.h: add aarch64 property definitions

Message ID 20200430173751.GX29015@arm.com
State Superseded
Headers show
Series aarch64: branch protection support | expand

Commit Message

Szabolcs Nagy April 30, 2020, 5:37 p.m. UTC
These property values are specified by the AArch64 ELF ABI and
binutils can create binaries marked with them.
---
 elf/elf.h | 6 ++++++
 1 file changed, 6 insertions(+)

Comments

Adhemerval Zanella May 7, 2020, 2:50 p.m. UTC | #1
On 30/04/2020 14:37, Szabolcs Nagy wrote:
> These property values are specified by the AArch64 ELF ABI and
> binutils can create binaries marked with them.

LGTM, they match binutils (cd702818c6c).

Reviewed-by: Adhemerval Zanella  <adhemerval.zanella@linaro.org>

> ---
>  elf/elf.h | 6 ++++++
>  1 file changed, 6 insertions(+)
> 
> diff --git a/elf/elf.h b/elf/elf.h
> index 5b5ce37d9e..197b557d15 100644
> --- a/elf/elf.h
> +++ b/elf/elf.h
> @@ -1319,6 +1319,12 @@ typedef struct
>  /* Application-specific semantics, hi */
>  #define GNU_PROPERTY_HIUSER			0xffffffff
>  
> +/* AArch64 specific GNU properties.  */
> +#define GNU_PROPERTY_AARCH64_FEATURE_1_AND	0xc0000000
> +
> +#define GNU_PROPERTY_AARCH64_FEATURE_1_BTI	(1U << 0)
> +#define GNU_PROPERTY_AARCH64_FEATURE_1_PAC	(1U << 1)
> +
>  /* The x86 instruction sets indicated by the corresponding bits are
>     used in program.  Their support in the hardware is optional.  */
>  #define GNU_PROPERTY_X86_ISA_1_USED		0xc0000000
>
diff mbox series

Patch

diff --git a/elf/elf.h b/elf/elf.h
index 5b5ce37d9e..197b557d15 100644
--- a/elf/elf.h
+++ b/elf/elf.h
@@ -1319,6 +1319,12 @@  typedef struct
 /* Application-specific semantics, hi */
 #define GNU_PROPERTY_HIUSER			0xffffffff
 
+/* AArch64 specific GNU properties.  */
+#define GNU_PROPERTY_AARCH64_FEATURE_1_AND	0xc0000000
+
+#define GNU_PROPERTY_AARCH64_FEATURE_1_BTI	(1U << 0)
+#define GNU_PROPERTY_AARCH64_FEATURE_1_PAC	(1U << 1)
+
 /* The x86 instruction sets indicated by the corresponding bits are
    used in program.  Their support in the hardware is optional.  */
 #define GNU_PROPERTY_X86_ISA_1_USED		0xc0000000