[PATCH v3 11/18] BFD: Correct archive format determination for non-default link emulations
Maciej W. Rozycki
macro@redhat.com
Tue Dec 9 16:06:02 GMT 2025
On Tue, 9 Dec 2025, Jan Beulich wrote:
> > Address the issue by always checking the format of the first member of
> > an archive even if no default target has been specified, except when the
> > target being checked against is be the plugin target. Verified by hand
> > and the `powerpc64le-linux-gnu' target to cause no issue with the recipe
> > in PR binutils/13278 and removing failures from segmentation faults with
> > the new tests:
> >
> > cris-aout -FAIL: CRIS regular archive link (implicit emulation)
> > cris-aout -FAIL: CRIS thin archive link (implicit emulation)
>
> Looks plausible to me, but given the history could really do with Alan also
> taking a look. And of course ...
FWIW I yet want to go back to the place of the segmentation fault and add
an assertion there, as it's a format mismatch case, i.e. an a.out handler
handed an ELF BFD, which is obviously not a user error. Somehow it didn't
struck me right away to do that. It can/will be a change on its own of
course.
> > ---
> > bfd/archive.c | 2 +-
> > ld/testsuite/ld-cris/archive.exp | 21 +++++++++++++++++++++
> > 2 files changed, 22 insertions(+), 1 deletion(-)
>
> ... you will want Hans-Peter's okay as well.
Already approved with an umbrella response to 00/18:
On Thu, 20 Nov 2025, Hans-Peter Nilsson wrote:
> The patchset is ok for cris*-*, thanks.
Maciej
More information about the Binutils
mailing list