diff options
author | Srinath Parvathaneni <srinath.parvathaneni@arm.com> | 2024-10-16 15:42:08 +0100 |
---|---|---|
committer | Andre Vieira <andre.simoesdiasvieira@arm.com> | 2024-10-16 15:47:13 +0100 |
commit | 8d59fa447f688b7863a5b3e6af5015e36c7f0024 (patch) | |
tree | 7620b9253ea8b3dc830cc2ad7b4ba78de9459265 /ld/testsuite/ld-aarch64/property-gcs2.d | |
parent | a9ed7a0814fc70feaad485576d043a983b6f8695 (diff) | |
download | gdb-users/ARM/gcs.zip gdb-users/ARM/gcs.tar.gz gdb-users/ARM/gcs.tar.bz2 |
aarch64: Add support for GCS to AArch64 linkerusers/ARM/gcs
This patch adds support for Guarded Control Stack in AArch64 linker.
This patch implements the following:
1) Defines GNU_PROPERTY_AARCH64_FEATURE_1_GCS bit for GCS in
GNU_PROPERTY_AARCH64_FEATURE_1_AND macro.
2) Adds readelf support to read and print the GNU properties
in AArch64.
Displaying notes found in: .note.gnu.property
[ ]+Owner[ ]+Data size[ ]+Description
GNU 0x00000010 NT_GNU_PROPERTY_TYPE_0
Properties: AArch64 feature: GCS
3) Adds support for the "-z gcs" linker option and document all the values
allowed with this option (-z gcs[=always|never|implicit]) where "-z gcs" is
equivalent to "-z gcs=always" and when this option is not passed in the
command line, it defaults to "implicit".
4) Adds support for the "-z gcs-report" linker option and document all the
values allowed with this option (-z gcs-report[=none|warning|error]) where
"-z gcs-report" is equivalent to "-z gcs-report=none" and when this option
is not passed in the command line, it defaults to "none".
The ABI changes adding GNU_PROPERTY_AARCH64_FEATURE_1_GCS to the
GNU property GNU_PROPERTY_AARCH64_FEATURE_1_AND is merged into main and
can be found in [1].
[1] https://github.com/ARM-software/abi-aa/blob/main/sysvabi64/sysvabi64.rst
Co-authored-by: Matthieu Longo <matthieu.longo@arm.com>
Co-authored-by: Yury Khrustalev <yury.khrustalev@arm.com>
Diffstat (limited to 'ld/testsuite/ld-aarch64/property-gcs2.d')
-rw-r--r-- | ld/testsuite/ld-aarch64/property-gcs2.d | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/ld/testsuite/ld-aarch64/property-gcs2.d b/ld/testsuite/ld-aarch64/property-gcs2.d new file mode 100644 index 0000000..ed545a1 --- /dev/null +++ b/ld/testsuite/ld-aarch64/property-gcs2.d @@ -0,0 +1,11 @@ +#name: GNU Property (input with gcs) +#source: property-gcs.s +#alltargets: [check_shared_lib_support] *linux* +#as: -march=armv9.4-a+gcs -defsym __mult__=0 -defsym __property_gcs__=1 +#ld: -shared +#readelf: -n + +Displaying notes found in: .note.gnu.property +[ ]+Owner[ ]+Data size[ ]+Description + GNU 0x00000010 NT_GNU_PROPERTY_TYPE_0 + Properties: AArch64 feature: GCS |