[PATCH 7/8] PR ld/24600: BFD: Add general linker support for mapless archives

Maciej W. Rozycki macro@redhat.com
Wed Oct 1 12:33:08 GMT 2025


On Mon, 29 Sep 2025, Hans-Peter Nilsson wrote:

> > and the feature they cover 
> > is new as well.  It's just that the feature as it stands is not going to 
> > work for CRIS, and FAOD I'm not happy about it at all.
> > 
> >  The issue however is in generic archive handling code and it's not clear 
> > to me what the proper way to move forward is for BFD here.  I'm happy to 
> > discuss solutions, but I'd rather that didn't hold the feature, which is 
> > tangential to the issue triggered.
> 
> Of course, but isn't xfailing (or kfailing) for CRIS simple
> and obvious?

 Not without an associated PR, which is why I chose not to do so in the 
initial submission.  And I'm not sure what to put in such as PR, as we've 
got at least two issues vaguely defined here (not counting the CRIS's BFD 
vs LD default target/emulation choice oddity).

 If we don't get this sorted before committing this patch, then I'll dump 
whatever has been established so far into a PR and add the annotation for 
CRIS targets you've requested.

> >  Also I'm in favour of using KFAIL where applicable according to DejaGNU 
> > test result interpretation guidelines as it allows for a PR to be named 
> > and visible in the test log, so that a KPASS lets one know right away 
> > where to look.
> 
> That'd happen for xfail as well, AFAIK...

 Good point.  I had it mentally encoded otherwise and it escaped me before 
that it isn't the case owing to DejaGNU documentation, which used to say:

KFAIL

    A test is known to fail in some environment(s) due to a known bug in 
    the tool being tested (identified by a bug id string).  This exists so 
    that, after a bug is identified and properly registered in a bug 
    tracking database (Gnats, for instance), the count of failures can be 
    kept as zero. [...] The procedure setup_kfail is used to indicate a 
    failure is known to exist.

vs:

XFAIL

    A test is expected to fail in some environment(s) due to some bug in 
    the environment that we hope is fixed someday (but we can't do nothing 
    about as it is not a bug in the tool that we are testing).  The 
    procedure setup_xfail is used to indicate that a failure is expected.

i.e. no mention of a bug reference for XFAIL.  I can see now documentation 
for KFAIL/KPASS has been since removed from DejaGNU; neither KFAIL/KPASS 
nor XFAIL/XPASS results are POSIX compliant anyway, so it's not clear to 
me what happened here.  Also I guess it shows my age.

> The only extant uses of kfail in the ld testsuite seem for
> be in testsuite/ld-mips-elf/mips-elf.exp for some reason. ;)

 Point taken.  The reason is quoted above anyway.

> So if we get to that point, I insist to use xfail, as is used
> everywhere else in the ld testsuite.

 Well, I can't be bothered to insist either way, though I'd love to know 
what happened to KFAIL/KPASS documentation.  Anyone?

> Bottom line: if your patch is approved in general before
> I've made steps to fix that cris-aout-before-cris-elf wart,
> please xfail the failing cases for cris*-elf and
> cris*-linux.

 I will, as noted above.  I have also added `cris-aout' now to my list of 
targets verified, and updated the relevant target pattern lists in 1/8 and 
8/8 accordingly, as the target suffers from the same AR issue as the other 
a.out ones do (and, as expected, does not cause LD to crash with the new 
tests/feature).

> >  But I think 
> > we ought to address the issues in generic archive handling regardless, and 
> > in a way I'm glad for this odd arrangement for CRIS to have uncovered the 
> > matter.
> 
> Always happy to help with a bit of quirkiness.

 ;)

 Thank you for your feedback, always appreciated.

  Maciej



More information about the Binutils mailing list