[PATCH V3] optimize handle_COMDAT

Alan Modra amodra@gmail.com
Tue Aug 1 01:11:47 GMT 2023


On Mon, Jul 03, 2023 at 12:09:22AM +0200, Oleg Tolmatcev via Binutils wrote:
> Am Fr., 30. Juni 2023 um 14:08 Uhr schrieb Nick Clifton <nickc@redhat.com>:
> > Thank you.  Unfortunately there are still a couple of problems
> > with the patch,  Firstly, and most importantly, the patch triggers
> > a new failure in the linker testsuite:
> >
> >    Running ld/testsuite/ld-linkonce/linkonce.exp ...
> >    [...]
> >    FAIL: pr26103
> >
> 
> I have run "make check" in WSL and it passed. I then rebased the patch
> on top of master and ran "make check" in WSL again and it passed. I
> can not reproduce the failure. I develop on Windows, but I even ran it
> on my Linux machine with Manjaro Linux and it passed.

I applied your latest patch, and it results in failures as Nick said.

aarch64-pe  +FAIL: pr26103
arm-pe  +FAIL: pr26103
arm-wince-pe  +FAIL: pr26103
i686-pe  +FAIL: pr26103
mcore-pe  +FAIL: pr26103
sh-pe  +FAIL: pr26103
x86_64-w64-mingw32  +FAIL: pr26103

This is with mainline binutils built on x86_64-linux using
~/src/binutils-gdb/configure \
--disable-nls \
--disable-gdb --disable-gdbserver --disable-gdbsupport --disable-gprofng \
--disable-libbacktrace --disable-libdecnumber --disable-readline --disable-sim \
--enable-obsolete --target=$target
make && make check

I think something is wrong with your testing.  In ld/ld.log for
x86_64-w64-mingw32 I see

./ld-new   -o tmpdir/pr26103  -L/home/alan/src/binutils-gdb/ld/testsuite/ld-linkonce  tmpdir/ref1.o --start-group tmpdir/sym.a tmpdir/ref2.o --end-group
Executing on host: sh -c {./ld-new   -o tmpdir/pr26103  -L/home/alan/src/binutils-gdb/ld/testsuite/ld-linkonce  tmpdir/ref1.o --start-group tmpdir/sym.a tmpdir/ref2.o --end-group 2>&1}  /dev/null ld.tmp (timeout = 300)
spawn [open ...]
./ld-new: tmpdir/sym.a(sym2.o):fake:(.gnu.linkonce.d.foo[onex]+0x0): multiple definition of `foo'; tmpdir/sym.a(sym1.o):fake:(.gnu.linkonce.d.foo[one]+0x0): first defined here
./ld-new: tmpdir/sym.a(sym3.o):fake:(.gnu.linkonce.d.foo[oney]+0x0): multiple definition of `foo'; tmpdir/sym.a(sym1.o):fake:(.gnu.linkonce.d.foo[one]+0x0): first defined here
./ld-new: tmpdir/sym.a(sym2.o):fake:(.gnu.linkonce.d.foo[onex]+0x0): multiple definition of `foo'; tmpdir/sym.a(sym1.o):fake:(.gnu.linkonce.d.foo[one]+0x0): first defined here
./ld-new: tmpdir/sym.a(sym3.o):fake:(.gnu.linkonce.d.foo[oney]+0x0): multiple definition of `foo'; tmpdir/sym.a(sym1.o):fake:(.gnu.linkonce.d.foo[one]+0x0): first defined here
FAIL: pr26103

-- 
Alan Modra
Australia Development Lab, IBM


More information about the Binutils mailing list