[PATCH v3] aarch64: Add support for GCS in AArch64 linker.
Srinath Parvathaneni
srinath.parvathaneni@arm.com
Wed Sep 11 13:03:44 GMT 2024
Hi,
Changes from v2 - > v3:
v1: https://sourceware.org/pipermail/binutils/2024-January/131564.html
v2: https://sourceware.org/pipermail/binutils/2024-January/132234.html
v1 of this patch is reviewed by Nick Clifton and provided few review comments.
I have addressed those comments in v2 and committed the patch to vendor branch:
"origin/users/ARM/gcs-binutils-gdb-master"
v3 is the re-based patch of v2 (with no code changes, cherry-pick cleanly applies).
Is this patch ok for binuitls master?
Regards,
Srinath.
---
This patch adds support for GCS 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 -z experimental-gcs linker option and document
all the values allowed with option (-z experimental-gcs[=always|never|implicit]).
-z experimental-gcs is equivalent to -z experimental-gcs=always and
when option is not passed in the command line, it defaults to implicit.
4) Adds support for -z experimental-gcs-report linker option and document
all the values allowed with this option (-z experimental-gcs-report[=none|warning|error]).
-z experimental-gcs-report is equivalent to -z experimental-gcs-report=none
and when 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 below.
https://github.com/ARM-software/abi-aa/blob/main/sysvabi64/sysvabi64.rst
---
bfd/elfnn-aarch64.c | 87 +++++++++++++++++----
bfd/elfxx-aarch64.c | 37 ++++++++-
bfd/elfxx-aarch64.h | 36 +++++++--
binutils/readelf.c | 4 +
include/elf/common.h | 1 +
ld/emultempl/aarch64elf.em | 45 ++++++++++-
ld/testsuite/ld-aarch64/aarch64-elf.exp | 23 ++++++
ld/testsuite/ld-aarch64/property-bti-pac1.d | 2 +-
ld/testsuite/ld-aarch64/property-bti-pac1.s | 14 ++++
ld/testsuite/ld-aarch64/property-gcs.s | 25 ++++++
ld/testsuite/ld-aarch64/property-gcs1.d | 6 ++
ld/testsuite/ld-aarch64/property-gcs10.d | 6 ++
ld/testsuite/ld-aarch64/property-gcs11.d | 11 +++
ld/testsuite/ld-aarch64/property-gcs12.d | 11 +++
ld/testsuite/ld-aarch64/property-gcs13.d | 11 +++
ld/testsuite/ld-aarch64/property-gcs14.d | 11 +++
ld/testsuite/ld-aarch64/property-gcs15.d | 11 +++
ld/testsuite/ld-aarch64/property-gcs16.d | 11 +++
ld/testsuite/ld-aarch64/property-gcs17.d | 11 +++
ld/testsuite/ld-aarch64/property-gcs18.d | 11 +++
ld/testsuite/ld-aarch64/property-gcs19.d | 6 ++
ld/testsuite/ld-aarch64/property-gcs2.d | 11 +++
ld/testsuite/ld-aarch64/property-gcs2.s | 33 ++++++++
ld/testsuite/ld-aarch64/property-gcs20.d | 6 ++
ld/testsuite/ld-aarch64/property-gcs21.d | 6 ++
ld/testsuite/ld-aarch64/property-gcs22.d | 11 +++
ld/testsuite/ld-aarch64/property-gcs3.d | 11 +++
ld/testsuite/ld-aarch64/property-gcs4.d | 11 +++
ld/testsuite/ld-aarch64/property-gcs5.d | 11 +++
ld/testsuite/ld-aarch64/property-gcs6.d | 12 +++
ld/testsuite/ld-aarch64/property-gcs7.d | 6 ++
ld/testsuite/ld-aarch64/property-gcs8.d | 11 +++
ld/testsuite/ld-aarch64/property-gcs9.d | 12 +++
33 files changed, 495 insertions(+), 26 deletions(-)
create mode 100644 ld/testsuite/ld-aarch64/property-gcs.s
create mode 100644 ld/testsuite/ld-aarch64/property-gcs1.d
create mode 100644 ld/testsuite/ld-aarch64/property-gcs10.d
create mode 100644 ld/testsuite/ld-aarch64/property-gcs11.d
create mode 100644 ld/testsuite/ld-aarch64/property-gcs12.d
create mode 100644 ld/testsuite/ld-aarch64/property-gcs13.d
create mode 100644 ld/testsuite/ld-aarch64/property-gcs14.d
create mode 100644 ld/testsuite/ld-aarch64/property-gcs15.d
create mode 100644 ld/testsuite/ld-aarch64/property-gcs16.d
create mode 100644 ld/testsuite/ld-aarch64/property-gcs17.d
create mode 100644 ld/testsuite/ld-aarch64/property-gcs18.d
create mode 100644 ld/testsuite/ld-aarch64/property-gcs19.d
create mode 100644 ld/testsuite/ld-aarch64/property-gcs2.d
create mode 100644 ld/testsuite/ld-aarch64/property-gcs2.s
create mode 100644 ld/testsuite/ld-aarch64/property-gcs20.d
create mode 100644 ld/testsuite/ld-aarch64/property-gcs21.d
create mode 100644 ld/testsuite/ld-aarch64/property-gcs22.d
create mode 100644 ld/testsuite/ld-aarch64/property-gcs3.d
create mode 100644 ld/testsuite/ld-aarch64/property-gcs4.d
create mode 100644 ld/testsuite/ld-aarch64/property-gcs5.d
create mode 100644 ld/testsuite/ld-aarch64/property-gcs6.d
create mode 100644 ld/testsuite/ld-aarch64/property-gcs7.d
create mode 100644 ld/testsuite/ld-aarch64/property-gcs8.d
create mode 100644 ld/testsuite/ld-aarch64/property-gcs9.d
-------------- next part --------------
A non-text attachment was scrubbed...
Name: v3-0001-aarch64-Add-support-for-GCS-in-AArch64-linker.patch
Type: text/x-patch
Size: 33803 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/binutils/attachments/20240911/1b37cfae/attachment-0001.bin>
More information about the Binutils
mailing list