[binutils-gdb] CRIS/LD/testsuite: Clarify the purpose of archive.exp verification
Maciej W. Rozycki
macro@sourceware.org
Mon Feb 16 06:32:43 GMT 2026
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=2d306bf8a70e4ef9d6cd6eeecf17a8e6f4f04151
commit 2d306bf8a70e4ef9d6cd6eeecf17a8e6f4f04151
Author: Maciej W. Rozycki <macro@redhat.com>
Date: Mon Feb 16 06:30:48 2026 +0000
CRIS/LD/testsuite: Clarify the purpose of archive.exp verification
Add an introductory comment describing the purpose of CRIS archive tests
as well as explanatory notes in the context of PR binutils/33485.
Diff:
---
ld/testsuite/ld-cris/archive.exp | 17 +++++++++++++++++
1 file changed, 17 insertions(+)
diff --git a/ld/testsuite/ld-cris/archive.exp b/ld/testsuite/ld-cris/archive.exp
index fe05b9014fd..b5eb28bd56a 100644
--- a/ld/testsuite/ld-cris/archive.exp
+++ b/ld/testsuite/ld-cris/archive.exp
@@ -18,6 +18,20 @@
# see <http://www.gnu.org/licenses/>.
#
+# This covers archive handling with a non-default linker emulation
+# triggering the use of a non-default archive format.
+#
+# The CRIS target is the only one nowadays that supports aout and
+# non-aout formats both at a time, and the aout BFD backend is one
+# that used to crash when incorrectly chosen by the BFD linker to
+# handle ELF archive members despite the ELF emulation explicitly
+# requested.
+#
+# For completeness this test covers the opposite situation as well
+# (except for Linux targets, which don't support linker emulation
+# switching), although it used not to cause a crash, but hits PR
+# binutils/33485 instead. Yeah, corner cases and bitrot...
+
if [istarget cris-*-*aout*] {
set asemul "--emulation=criself"
set aremul "--target=elf32-us-cris"
@@ -69,6 +83,9 @@ run_ld_link_tests [list \
"abcx" \
] \
]
+# PR binutils/33485 hits with the aout archive format and with this
+# test that format is used with non-aout targets, hence the reverse
+# condition. Cf. the note at the top.
if { ![istarget cris-*-*aout*] } {
setup_xfail "binutils/33485" "*-*-*"
}
More information about the Binutils-cvs
mailing list