[PATCH v12 23/25] gnu directives: gas/readelf tests for gnu attributes v2
Jan Beulich
jbeulich@suse.com
Wed Jan 21 10:43:23 GMT 2026
On 16.01.2026 19:59, Matthieu Longo wrote:
> These tests are a copy-paste of the generic parsing tests for AArch64.
>
> The added tests cover the parsing of the new assembly directives
> (gnu_subsection and gnu_attribute), the serialization of the
> Object Attributes v2 (OAv2) data into an object file, and the
> dumping of those data via readelf.
>
> The parsing tests focus on the following points:
> - the syntax of the new directives.
> - the recognition of generic tokens like: NTBS, ULEB128, required,
> optional.
>
> The dumping tests focus on:
> - the OAv2 population into the correct section assigned by the backend.
> - the merge of the subsections and attributes when they are declared
> several times inside respectively the same compilation unit, and
> subsection.
> - the sorting of OAv2 before the serialization.
> ---
> binutils/testsuite/lib/binutils-common.exp | 33 +++++++++
> .../gas/gnu-attributes/gnu-attributes.exp | 20 +++++
> .../oa-no-gnu-attribute-directive.d | 4 +
> .../oa-no-gnu-attribute-directive.s | 1 +
> .../oa-no-gnu-subsection-directive.d | 4 +
> .../oa-no-gnu-subsection-directive.s | 1 +
> .../gas/gnu-attributes/oav2-failures-1.d | 3 +
> .../gas/gnu-attributes/oav2-failures-1.l | 40 ++++++++++
> .../gas/gnu-attributes/oav2-failures-1.s | 70 ++++++++++++++++++
> .../oav2-interleaved-subsections.d | 34 +++++++++
> .../oav2-interleaved-subsections.s | 32 ++++++++
> .../gnu-attributes/oav2-subsection-parsing.d | 74 +++++++++++++++++++
> .../gnu-attributes/oav2-subsection-parsing.s | 37 ++++++++++
> .../gas/gnu-attributes/oav2-success-1.d | 52 +++++++++++++
> .../gas/gnu-attributes/oav2-success-1.s | 32 ++++++++
> 15 files changed, 437 insertions(+)
> create mode 100644 gas/testsuite/gas/gnu-attributes/gnu-attributes.exp
> create mode 100644 gas/testsuite/gas/gnu-attributes/oa-no-gnu-attribute-directive.d
> create mode 100644 gas/testsuite/gas/gnu-attributes/oa-no-gnu-attribute-directive.s
> create mode 100644 gas/testsuite/gas/gnu-attributes/oa-no-gnu-subsection-directive.d
> create mode 100644 gas/testsuite/gas/gnu-attributes/oa-no-gnu-subsection-directive.s
> create mode 100644 gas/testsuite/gas/gnu-attributes/oav2-failures-1.d
> create mode 100644 gas/testsuite/gas/gnu-attributes/oav2-failures-1.l
> create mode 100644 gas/testsuite/gas/gnu-attributes/oav2-failures-1.s
> create mode 100644 gas/testsuite/gas/gnu-attributes/oav2-interleaved-subsections.d
> create mode 100644 gas/testsuite/gas/gnu-attributes/oav2-interleaved-subsections.s
> create mode 100644 gas/testsuite/gas/gnu-attributes/oav2-subsection-parsing.d
> create mode 100644 gas/testsuite/gas/gnu-attributes/oav2-subsection-parsing.s
> create mode 100644 gas/testsuite/gas/gnu-attributes/oav2-success-1.d
> create mode 100644 gas/testsuite/gas/gnu-attributes/oav2-success-1.s
Still somewhat hesitantly: Okay.
Jan
More information about the Binutils
mailing list