[15/22] aarch64: Emit GNU property NOTE for GCS
Commit Message
From: Szabolcs Nagy <szabolcs.nagy@arm.com>
gcc/ChangeLog:
* config/aarch64/aarch64.cc (GNU_PROPERTY_AARCH64_FEATURE_1_GCS):
Define.
(aarch64_file_end_indicate_exec_stack): Set GCS property bit.
---
gcc/config/aarch64/aarch64.cc | 5 +++++
1 file changed, 5 insertions(+)
@@ -29242,6 +29242,7 @@ aarch64_can_tag_addresses ()
#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)
+#define GNU_PROPERTY_AARCH64_FEATURE_1_GCS (1U << 2)
void
aarch64_file_end_indicate_exec_stack ()
{
@@ -29254,6 +29255,9 @@ aarch64_file_end_indicate_exec_stack ()
if (aarch_ra_sign_scope != AARCH_FUNCTION_NONE)
feature_1_and |= GNU_PROPERTY_AARCH64_FEATURE_1_PAC;
+ if (aarch64_gcs_enabled ())
+ feature_1_and |= GNU_PROPERTY_AARCH64_FEATURE_1_GCS;
+
if (feature_1_and)
{
/* Generate .note.gnu.property section. */
@@ -29285,6 +29289,7 @@ aarch64_file_end_indicate_exec_stack ()
assemble_align (POINTER_SIZE);
}
}
+#undef GNU_PROPERTY_AARCH64_FEATURE_1_GCS
#undef GNU_PROPERTY_AARCH64_FEATURE_1_PAC
#undef GNU_PROPERTY_AARCH64_FEATURE_1_BTI
#undef GNU_PROPERTY_AARCH64_FEATURE_1_AND