[PATCH v5 03/12] BFD: Correct archive format determination for non-default link emulations

Hans-Peter Nilsson hp@axis.com
Tue Feb 3 00:15:22 GMT 2026


> Date: Mon, 2 Feb 2026 23:47:40 +0000 (GMT)
> From: "Maciej W. Rozycki" <macro@redhat.com>

> On Wed, 28 Jan 2026, Hans-Peter Nilsson wrote:
> 
> > > > Hmm, the parameters and the test-description don't look
> > > > a.out-cris-specific.  What am I missing?
> > > 
> > >  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 crashes when 
> > > incorrectly chosen by the BFD linker to handle ELF archive members.  For 
> > > completeness this test covers the opposite situation as well, though it 
> > > doesn't cause a crash, but hits PR binutils/33485 instead.  Yeah, corner 
> > > cases and bitrot...
> > 
> > Sounds like great material for a comment above the xfail.
> 
>  Well, the crash has been fixed with this very change and much of this 
> refers to the whole of this test script, so in v6 I'll add this at the 
> top, right after the copyright stuff:

Maybe that helps too, but please take the view of the casual
reader, that seems too far from the xfail.  So just above
the xfail line: "# Something something hits PR
binutils/33485 instead" (not actual quote :).

> 
> # 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...
> 
> I'll yet wait for further feedback though as I think respinning the whole 
> series just for this comment (and the minor commit description fix) would 
> be wasting everyone's bandwidth.
> 
>   Maciej
> 


More information about the Binutils mailing list