[PATCH v4 0/3] Add lto and none-lto output support for ld -r

Alan Modra amodra@gmail.com
Tue Jan 14 07:23:45 GMT 2025


On Tue, Jan 14, 2025 at 11:58:56AM +0800, H.J. Lu wrote:
> On Tue, Jan 14, 2025 at 7:50 AM Alan Modra <amodra@gmail.com> wrote:
> >
> > On Mon, Jan 13, 2025 at 02:03:56PM +0000, Nick Clifton wrote:
> > > Hi H.J.
> > >
> > > > Changes in v4:
> > > >
> > > > 1. Fold the 3rd patch into the 1st patch to fix "FAIL: nm --plugin" when
> > > > the 1st patch is applied alone.
> > > > 2. Change IR to LTO in linker manual.
> > > >
> > > Patch series approved.  Please apply.
> >
> > i386-msdos  +FAIL: --gc-sections -r without -e
> > i386-msdos  +FAIL: -l: test (preparation)
> 
> I can't reproduce these.

commit 04cd256685fa
~/src/binutils-virgin/configure \
--disable-nls \
--disable-gdb --disable-gdbserver --disable-gdbsupport --disable-gprofng \
--disable-libbacktrace --disable-libdecnumber --disable-readline --disable-sim \
--enable-obsolete --target=i386-msdos

../gas/as-new -o tmpdir/noent.o /home/alan/src/binutils-virgin/ld/testsuite/ld-gc/noent.s
./ld-new -L/home/alan/src/binutils-virgin/ld/testsuite/ld-gc --gc-sections -r -o tmpdir/dump tmpdir/noent.o
./ld-new: internal error: aborting at /home/alan/src/binutils-virgin/ld/ldlang.c:11009 in cmdline_check_object_only_section
./ld-new: please report this bug

I rechecked in a clean build dir too.  Same result.

> > mips-linux-gnu  +FAIL: ld-plugin/lto-4r-a
> > mips-linux-gnu  +FAIL: ld-plugin/lto-4r-b
> > mips-linux-gnu  +FAIL: ld-plugin/lto-4r-c
> > mips-linux-gnu  +FAIL: ld-plugin/lto-4r-d
> > mips-linux-gnu  +FAIL: ld-plugin/lto-10r
> > mips-linux-gnu  +FAIL: LTO 5 symbol
> > mips-linux-gnu  +FAIL: LTO 3b
> > mips-linux-gnu  +FAIL: LTO 5
> > mips-linux-gnu  +FAIL: PR ld/19317 (3)
> 
> These tests failed with
> 
> linking abicalls files with non-abicalls files

Right.

> because of the empty dummy file, similar to other LTO
> failures.  We can skip LTO tests with the empty dummy file
> for mips-linux-gnu.
> 
> > ns32k-openbsd  +FAIL: --gc-sections -r without -e
> > ns32k-openbsd  +FAIL: -l: test (preparation)
> > ns32k-openbsd  +FAIL: -l: test
> > ns32k-openbsd  +FAIL: Object for --just-symbols test
> > ns32k-pc532-mach  +FAIL: --gc-sections -r without -e
> > ns32k-pc532-mach  +FAIL: -l: test (preparation)
> > ns32k-pc532-mach  +FAIL: -l: test
> > ns32k-pc532-mach  +FAIL: Object for --just-symbols test
> > pdp11-dec-aout  +FAIL: --gc-sections -r without -e
> > pdp11-dec-aout  +FAIL: -l: test (preparation)
> > pdp11-dec-aout  +FAIL: -l: test
> > pdp11-dec-aout  +FAIL: Object for --just-symbols test
> 
> Can't reproduce these.

Similar to i386-msdos, all aborts in cmdline_check_object_only_section.

> > powerpc64-linux-gnu  +FAIL: nm mixed object
> 
> Will update the test.
> 
> > powerpc-aix5.1  +FAIL: --gc-sections -r without -e
> > powerpc-aix5.1  +FAIL: -l: test (preparation)
> > powerpc-aix5.1  +FAIL: -l: test
> > powerpc-aix5.1  +FAIL: Object for --just-symbols test
> > powerpc-aix7.2  +FAIL: --gc-sections -r without -e
> > powerpc-aix7.2  +FAIL: -l: test (preparation)
> > powerpc-aix7.2  +FAIL: -l: test
> > powerpc-aix7.2  +FAIL: Object for --just-symbols test
> > powerpc-aix7.2  +FAIL: Duplicate symbol check 1 (rel) (32-bit)
> > powerpc-aix7.2  +FAIL: Duplicate symbol check 1 (rel) (64-bit)
> > powerpc-aix7.2  +FAIL: Export test 1 (object) (32-bit)
> > powerpc-aix7.2  +FAIL: Export test 1 (object) (64-bit)
> > powerpc-aix7.2  +FAIL: Export test 1 (-bexpall) (32-bit)
> > powerpc-aix7.2  +FAIL: Export test 1 (-bexpall) (64-bit)
> > powerpc-aix7.2  +FAIL: Export test 1 (-bexpfull) (32-bit)
> > powerpc-aix7.2  +FAIL: Export test 1 (-bexpfull) (64-bit)
> > powerpc-aix7.2  +FAIL: Glink test 2 (part b) (32-bit)
> > powerpc-aix7.2  +FAIL: Glink test 2 (part b) (64-bit)
> > powerpc-aix7.2  +FAIL: Glink test 2 (32-bit)
> > powerpc-aix7.2  +FAIL: Glink test 2 (64-bit)
> > powerpc-aix7.2  +FAIL: Relocatable test 1 (32-bit)
> > powerpc-aix7.2  +FAIL: Relocatable test 1 (64-bit)
> > powerpc-aix7.2  +FAIL: Weak test 1 (rel) (32-bit)
> > powerpc-aix7.2  +FAIL: Weak test 1 (rel) (64-bit)
> > rs6000-aix4.3.3  +FAIL: --gc-sections -r without -e
> > rs6000-aix4.3.3  +FAIL: -l: test (preparation)
> > rs6000-aix4.3.3  +FAIL: -l: test
> > rs6000-aix4.3.3  +FAIL: Object for --just-symbols test
> > rs6000-aix5.1  +FAIL: --gc-sections -r without -e
> > rs6000-aix5.1  +FAIL: -l: test (preparation)
> > rs6000-aix5.1  +FAIL: -l: test
> > rs6000-aix5.1  +FAIL: Object for --just-symbols test
> > rs6000-aix7.2  +FAIL: --gc-sections -r without -e
> > rs6000-aix7.2  +FAIL: -l: test (preparation)
> > rs6000-aix7.2  +FAIL: -l: test
> > rs6000-aix7.2  +FAIL: Object for --just-symbols test
> > rs6000-aix7.2  +FAIL: Duplicate symbol check 1 (rel) (32-bit)
> > rs6000-aix7.2  +FAIL: Duplicate symbol check 1 (rel) (64-bit)
> > rs6000-aix7.2  +FAIL: Export test 1 (object) (32-bit)
> > rs6000-aix7.2  +FAIL: Export test 1 (object) (64-bit)
> > rs6000-aix7.2  +FAIL: Export test 1 (-bexpall) (32-bit)
> > rs6000-aix7.2  +FAIL: Export test 1 (-bexpall) (64-bit)
> > rs6000-aix7.2  +FAIL: Export test 1 (-bexpfull) (32-bit)
> > rs6000-aix7.2  +FAIL: Export test 1 (-bexpfull) (64-bit)
> > rs6000-aix7.2  +FAIL: Glink test 2 (part b) (32-bit)
> > rs6000-aix7.2  +FAIL: Glink test 2 (part b) (64-bit)
> > rs6000-aix7.2  +FAIL: Glink test 2 (32-bit)
> > rs6000-aix7.2  +FAIL: Glink test 2 (64-bit)
> > rs6000-aix7.2  +FAIL: Relocatable test 1 (32-bit)
> > rs6000-aix7.2  +FAIL: Relocatable test 1 (64-bit)
> > rs6000-aix7.2  +FAIL: Weak test 1 (rel) (32-bit)
> > rs6000-aix7.2  +FAIL: Weak test 1 (rel) (64-bit)
> 
> Can't reproduce these.

Theses are all the same aborts too, or fallout from a previous fail.

> > x86_64-w64-mingw32  +FAIL: ld-plugin/lto-3r
> > x86_64-w64-mingw32  +FAIL: ld-plugin/lto-4r-a
> > x86_64-w64-mingw32  +FAIL: ld-plugin/lto-4r-b
> > x86_64-w64-mingw32  +FAIL: ld-plugin/lto-4r-c
> > x86_64-w64-mingw32  +FAIL: ld-plugin/lto-4r-d
> > x86_64-w64-mingw32  +FAIL: ld-plugin/lto-5r
> > x86_64-w64-mingw32  +FAIL: ld-plugin/lto-10r
> > x86_64-w64-mingw32  +FAIL: PR ld/19317 (2)
> > x86_64-w64-mingw32  +FAIL: LTO 4a
> > x86_64-w64-mingw32  +FAIL: LTO 4c
> > x86_64-w64-mingw32  +FAIL: LTO 4d
> > x86_64-w64-mingw32  +FAIL: LTO 10
> 
> These tests should only be run for ELF targets.
> 
> > --
> > Alan Modra
> 
> 
> 
> -- 
> H.J.

-- 
Alan Modra


More information about the Binutils mailing list