From: Maciej W. Rozycki Date: Mon, 16 Feb 2026 06:30:48 +0000 (+0000) Subject: CRIS/LD/testsuite: Clarify the purpose of archive.exp verification X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=HEAD;p=thirdparty%2Fbinutils-gdb.git 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 --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 . # +# 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" "*-*-*" }