diff mbox series

[v3,02/13] elf.h: add aarch64 property definitions

Message ID beb9c3e65e6d65c23b0e2e6825388707c063cf09.1589552054.git.szabolcs.nagy@arm.com
State Committed
Commit 03acbc1f71800a34dfbf4371c3443b1f1c73a4b9
Headers show
Series aarch64: branch protection support | expand

Commit Message

Szabolcs Nagy May 15, 2020, 2:40 p.m. UTC
These property values are specified by the AArch64 ELF ABI and
binutils can create binaries marked with them.

Reviewed-by: Adhemerval Zanella  <adhemerval.zanella@linaro.org>
---
 elf/elf.h | 6 ++++++
 1 file changed, 6 insertions(+)

Comments

Florian Weimer May 18, 2020, 3:26 p.m. UTC | #1
* Szabolcs Nagy:

> These property values are specified by the AArch64 ELF ABI and
> binutils can create binaries marked with them.
>
> 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

I checked that this matches the binutils definition.  I think this can
go in separately.

Thanks,
Florian
Szabolcs Nagy May 21, 2020, 8:57 a.m. UTC | #2
The 05/18/2020 17:26, Florian Weimer wrote:
> * Szabolcs Nagy:
> > +/* 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)
> 
> I checked that this matches the binutils definition.  I think this can
> go in separately.

now committed this and the PT_GNU_PROPERTY patch.
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