[PATCH 3/3] ld/testsuite: Add comprehensive PE COFF weak external tests
Peter Damianov
peter0x44@disroot.org
Sun Jun 7 20:19:36 GMT 2026
On 2026-06-01 12:39, Alan Modra wrote:
> On Sat, May 30, 2026 at 03:15:22PM -0400, Peter Damianov wrote:
>> Add tests covering the full matrix of weak/strong symbol interactions
>> for PE COFF weak externals, based on testcases by Martin Storsjo.
>
> On a cross build of x86_64-w64-mingw32 from x86_64-linux with gcc
> 13.2.0-6ubuntu1+26.1 installed, I see
> x86_64-w64-mingw32 +FAIL: weak external: strong undef + weak def
> (link)
> x86_64-w64-mingw32 +FAIL: weak external: duplicate weak defs (link)
I tried this myself, and while I don't know for sure what is wrong for
you, I saw these logs:
ERROR:
************************************************************************
ERROR: Your compiler apparently ignores -B when choosing ld.
ERROR: Hint: don't configure gcc using --with-ld (or --with-as)
ERROR: You will not be testing the new ld in many of the following
tests.
ERROR: It seems you will be testing /usr/bin/x86_64-w64-mingw32-ld
instead.
ERROR:
************************************************************************
So I suspect it's testing the wrong LD.
FAIL: weak external: strong undef + weak def (link)
FAIL: weak external: duplicate weak defs (link)
I did manage to reproduce your same failures, but my local gcc which is
probably configured differently is fine.
More information about the Binutils
mailing list