]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
CRIS/LD/testsuite: Clarify the purpose of archive.exp verification master
authorMaciej W. Rozycki <macro@redhat.com>
Mon, 16 Feb 2026 06:30:48 +0000 (06:30 +0000)
committerMaciej W. Rozycki <macro@redhat.com>
Mon, 16 Feb 2026 06:30:48 +0000 (06:30 +0000)
Add an introductory comment describing the purpose of CRIS archive tests
as well as explanatory notes in the context of PR binutils/33485.

ld/testsuite/ld-cris/archive.exp

index fe05b9014fda855a9ad549ccad7557f6e9879920..b5eb28bd56a0d5300422f3626c1c29132443c686 100644 (file)
 # 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" "*-*-*"
 }