about summary refs log tree commit diff
diff options
context:
space:
mode:
authorSzabolcs Nagy <szabolcs.nagy@arm.com>2023-12-22 12:29:48 +0000
committerSzabolcs Nagy <szabolcs.nagy@arm.com>2024-02-02 15:58:10 +0000
commit6c7378b54f6f8c3db222894ed27342782bf526b7 (patch)
tree2cc5dce9cfaa8c30aabd42699ee2585811860f69
parent0f6417aafcb5332cea53f81daa2dca9588c8b733 (diff)
downloadglibc-6c7378b54f6f8c3db222894ed27342782bf526b7.tar.gz
glibc-6c7378b54f6f8c3db222894ed27342782bf526b7.tar.xz
glibc-6c7378b54f6f8c3db222894ed27342782bf526b7.zip
aarch64: mark objects with GCS property note
TODO: binutils config check
TODO: build attributes instead of gnu property
-rw-r--r--sysdeps/aarch64/sysdep.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/sysdeps/aarch64/sysdep.h b/sysdeps/aarch64/sysdep.h
index 661d9fe8c1..55e0230b5e 100644
--- a/sysdeps/aarch64/sysdep.h
+++ b/sysdeps/aarch64/sysdep.h
@@ -85,6 +85,7 @@ strip_pac (void *p)
 #define FEATURE_1_AND 0xc0000000
 #define FEATURE_1_BTI 1
 #define FEATURE_1_PAC 2
+#define FEATURE_1_GCS 4
 
 /* Add a NT_GNU_PROPERTY_TYPE_0 note.  */
 #define GNU_PROPERTY(type, value)	\
@@ -103,9 +104,9 @@ strip_pac (void *p)
 /* Add GNU property note with the supported features to all asm code
    where sysdep.h is included.  */
 #if HAVE_AARCH64_BTI && HAVE_AARCH64_PAC_RET
-GNU_PROPERTY (FEATURE_1_AND, FEATURE_1_BTI|FEATURE_1_PAC)
+GNU_PROPERTY (FEATURE_1_AND, FEATURE_1_BTI|FEATURE_1_PAC|FEATURE_1_GCS)
 #elif HAVE_AARCH64_BTI
-GNU_PROPERTY (FEATURE_1_AND, FEATURE_1_BTI)
+GNU_PROPERTY (FEATURE_1_AND, FEATURE_1_BTI|FEATURE_1_GCS)
 #endif
 
 /* Define an entry point visible from C.  */