diff options
author | Szabolcs Nagy <szabolcs.nagy@arm.com> | 2024-11-14 16:15:12 +0000 |
---|---|---|
committer | Richard Sandiford <richard.sandiford@arm.com> | 2024-11-14 16:15:12 +0000 |
commit | 6f73c29d2fc27708476377749f7823bb86004bad (patch) | |
tree | 1276ebe10ce051a33ff7d580c6bb1eb3c94ae2e2 /libatomic | |
parent | d8374290e5780621c5faeffcce3d2899da5d5bef (diff) | |
download | gcc-6f73c29d2fc27708476377749f7823bb86004bad.zip gcc-6f73c29d2fc27708476377749f7823bb86004bad.tar.gz gcc-6f73c29d2fc27708476377749f7823bb86004bad.tar.bz2 |
aarch64: libatomic: add GCS marking to asm
libatomic/ChangeLog:
* config/linux/aarch64/atomic_16.S (FEATURE_1_GCS): Define.
(GCS_FLAG): Define if GCS is enabled.
(GNU_PROPERTY): Add GCS_FLAG.
Diffstat (limited to 'libatomic')
-rw-r--r-- | libatomic/config/linux/aarch64/atomic_16.S | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/libatomic/config/linux/aarch64/atomic_16.S b/libatomic/config/linux/aarch64/atomic_16.S index 5767fba..685db77 100644 --- a/libatomic/config/linux/aarch64/atomic_16.S +++ b/libatomic/config/linux/aarch64/atomic_16.S @@ -775,6 +775,7 @@ END_FEAT (compare_exchange_16, LSE) #define FEATURE_1_AND 0xc0000000 #define FEATURE_1_BTI 1 #define FEATURE_1_PAC 2 +#define FEATURE_1_GCS 4 /* Supported features based on the code generation options. */ #if defined(__ARM_FEATURE_BTI_DEFAULT) @@ -789,6 +790,12 @@ END_FEAT (compare_exchange_16, LSE) # define PAC_FLAG 0 #endif +#if __ARM_FEATURE_GCS_DEFAULT +# define GCS_FLAG FEATURE_1_GCS +#else +# define GCS_FLAG 0 +#endif + /* Add a NT_GNU_PROPERTY_TYPE_0 note. */ #define GNU_PROPERTY(type, value) \ .section .note.gnu.property, "a"; \ @@ -806,7 +813,7 @@ END_FEAT (compare_exchange_16, LSE) .section .note.GNU-stack, "", %progbits /* Add GNU property note if built with branch protection. */ -# if (BTI_FLAG|PAC_FLAG) != 0 -GNU_PROPERTY (FEATURE_1_AND, BTI_FLAG|PAC_FLAG) +# if (BTI_FLAG|PAC_FLAG|GCS_FLAG) != 0 +GNU_PROPERTY (FEATURE_1_AND, BTI_FLAG|PAC_FLAG|GCS_FLAG) # endif #endif |