[v4,03/22] elf.h: Define GNU_PROPERTY_AARCH64_FEATURE_1_GCS

Message ID 20241129163721.2385847-4-yury.khrustalev@arm.com
State Superseded
Delegated to: Carlos O'Donell
Headers
Series aarch64: Add support for Guarded Control Stack extension |

Checks

Context Check Description
redhat-pt-bot/TryBot-apply_patch success Patch applied to master at the time it was sent
linaro-tcwg-bot/tcwg_glibc_build--master-aarch64 success Build passed
linaro-tcwg-bot/tcwg_glibc_build--master-arm success Build passed
linaro-tcwg-bot/tcwg_glibc_check--master-aarch64 success Test passed
linaro-tcwg-bot/tcwg_glibc_check--master-arm success Test passed

Commit Message

Yury Khrustalev Nov. 29, 2024, 4:37 p.m. UTC
  From: Szabolcs Nagy <szabolcs.nagy@arm.com>

---
 elf/elf.h | 1 +
 1 file changed, 1 insertion(+)
  

Comments

Carlos O'Donell Dec. 2, 2024, 9:26 p.m. UTC | #1
On 11/29/24 11:37 AM, Yury Khrustalev wrote:
> From: Szabolcs Nagy <szabolcs.nagy@arm.com>
> 

Already in binutils:

commit b75ce33f0cd3a4720c252969bfffdac4f3f998a7
Author: Srinath Parvathaneni <srinath.parvathaneni@arm.com>
Date:   Mon Oct 28 18:13:08 2024 +0000

    aarch64: GCS feature check in GNU note properties for input objects

Already defined in the ABI:
https://github.com/ARM-software/abi-aa/blob/main/sysvabi64/sysvabi64.rst#program-property

LGTM.

This can go in right away.

Reviewed-by: Carlos O'Donell <carlos@redhat.com>

> ---
>  elf/elf.h | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/elf/elf.h b/elf/elf.h
> index 33aea7f743..970c3daaec 100644
> --- a/elf/elf.h
> +++ b/elf/elf.h
> @@ -1389,6 +1389,7 @@ typedef struct
>  
>  #define GNU_PROPERTY_AARCH64_FEATURE_1_BTI	(1U << 0)
>  #define GNU_PROPERTY_AARCH64_FEATURE_1_PAC	(1U << 1)
> +#define GNU_PROPERTY_AARCH64_FEATURE_1_GCS	(1U << 2)

OK. Matches sysvabi64.rst.

>  
>  /* The x86 instruction sets indicated by the corresponding bits are
>     used in program.  Their support in the hardware is optional.  */
  

Patch

diff --git a/elf/elf.h b/elf/elf.h
index 33aea7f743..970c3daaec 100644
--- a/elf/elf.h
+++ b/elf/elf.h
@@ -1389,6 +1389,7 @@  typedef struct
 
 #define GNU_PROPERTY_AARCH64_FEATURE_1_BTI	(1U << 0)
 #define GNU_PROPERTY_AARCH64_FEATURE_1_PAC	(1U << 1)
+#define GNU_PROPERTY_AARCH64_FEATURE_1_GCS	(1U << 2)
 
 /* The x86 instruction sets indicated by the corresponding bits are
    used in program.  Their support in the hardware is optional.  */