]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
gas: use common code for object attribute v1 & v2 parsing
authorMatthieu Longo <matthieu.longo@arm.com>
Thu, 17 Apr 2025 14:02:18 +0000 (15:02 +0100)
committerMatthieu Longo <matthieu.longo@arm.com>
Thu, 22 Jan 2026 10:11:16 +0000 (10:11 +0000)
commitf860cea7c69ffa3de1471f7dbb6efc8f9715db4c
treeb606569d13961c14aa07d4efbaf0b7788eb5c310
parent737979d0b3d3cc5590bd7e11e5895a1696d9aa1e
gas: use common code for object attribute v1 & v2 parsing

Since the previous patch added all the code to be able to parse both
OAv1 and OAv2 directives, this patch switches OAv1 to use this common
code.
Additionally to the common code in obj-elf.c, the following backends
using a custom object attribute directive were impacted.
  - ARC
  - Arm
  - m68k
  - PowerPC
  - RISC-V
  - TI C6X
A parsing test for Arm had to be adapted to the error messages of the
new parser.

The gas and ld test suites were successfully run for the following
backends: S390, ARC, Arm, CSky, m68k, msp430, PowerPC, TI C6X, RISC-V,
AArch64, MIPS, SPARC.
gas/config/obj-elf-attr.c
gas/config/obj-elf-attr.h
gas/config/tc-arc.c
gas/config/tc-arm.c
gas/config/tc-m68k.c
gas/config/tc-ppc.c
gas/config/tc-riscv.c
gas/config/tc-tic6x.c
gas/testsuite/gas/arm/attr-syntax.d