loongarch: add back support for object attributes v1

A previous commit [1] mistakenly removed support for Object Attributes
for LoongArch targets.

This patch adds back the OA feature into Gas for the LoongArch targets
following the new approach which consists in:
- defining TC_OBJ_ATTR to 1 in tc-loongarch.h
- enabling the compilation of obj-elf-attr.c in gas/configure.ac

[1]: 28a51085ae
This commit is contained in:
Matthieu Longo
2025-12-22 14:25:35 +00:00
parent f15240d714
commit d162e9f91b
3 changed files with 5 additions and 2 deletions

View File

@@ -149,4 +149,7 @@ struct reloc_info
#define md_finish loongarch_md_finish
extern void loongarch_md_finish (void);
/* The target supports Object Attributes. */
#define TC_OBJ_ATTR 1
#endif

2
gas/configure vendored
View File

@@ -12701,7 +12701,7 @@ _ACEOF
# Does the target support Object Attributes ?
case ${cpu_type} in
arc* | arm* | csky | m68k | mips* | msp430 | ppc* \
arc* | arm* | csky | loongarch | m68k | mips* | msp430 | ppc* \
| riscv* | s390* | sparc* | tic6x)
for f in config/obj-elf-attr.o; do
case " $extra_objects " in

View File

@@ -434,7 +434,7 @@ changequote([,])dnl
# Does the target support Object Attributes ?
case ${cpu_type} in
arc* | arm* | csky | m68k | mips* | msp430 | ppc* \
arc* | arm* | csky | loongarch | m68k | mips* | msp430 | ppc* \
| riscv* | s390* | sparc* | tic6x)
for f in config/obj-elf-attr.o; do
case " $extra_objects " in