[binutils-gdb] loongarch: add back support for object attributes v1
Matthieu Longo
mlongo@sourceware.org
Tue Dec 23 11:11:07 GMT 2025
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=d162e9f91b99daee2dffdaf179b30f9f1b800eaf
commit d162e9f91b99daee2dffdaf179b30f9f1b800eaf
Author: Matthieu Longo <matthieu.longo@arm.com>
Date: Mon Dec 22 14:25:35 2025 +0000
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]: 28a51085ae59fdb530fbdce1e2a7d160667e3007
Diff:
---
gas/config/tc-loongarch.h | 3 +++
gas/configure | 2 +-
gas/configure.ac | 2 +-
3 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/gas/config/tc-loongarch.h b/gas/config/tc-loongarch.h
index a2444aae0d1..206e7b4313a 100644
--- a/gas/config/tc-loongarch.h
+++ b/gas/config/tc-loongarch.h
@@ -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
diff --git a/gas/configure b/gas/configure
index 52bbfdc3e81..2bcb85bb666 100755
--- a/gas/configure
+++ b/gas/configure
@@ -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
diff --git a/gas/configure.ac b/gas/configure.ac
index f176578870d..1ec1f4a3bf8 100644
--- a/gas/configure.ac
+++ b/gas/configure.ac
@@ -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
More information about the Binutils-cvs
mailing list