* Re: build failure with crosstools gcc 15.1.0
[not found] <8362b484-ea77-4825-8ccb-d5acad660102@oss.qualcomm.com>
@ 2025-07-04 13:25 ` Arnd Bergmann
2025-07-24 10:44 ` Mark Rutland
0 siblings, 1 reply; 5+ messages in thread
From: Arnd Bergmann @ 2025-07-04 13:25 UTC (permalink / raw)
To: Jeff Johnson; +Cc: linux-kernel, Peter Zijlstra, Josh Poimboeuf
On Mon, Jun 23, 2025, at 21:52, Jeff Johnson wrote:
> I've been using crosstools gcc 14.2.0.
>
> Today I saw that gcc 15.1.0 has been added to crosstools:
> https://www.kernel.org/pub/tools/crosstool/files/bin/x86_64/15.1.0/
>
> But when I try it I'm getting an error:
> LD vmlinux.o
> vmlinux.o: warning: objtool: ncsi_process_next_channel() falls through
> to next function ncsi_channel_monitor.cold()
> vmlinux.o: error: objtool [elf.c:1360]: elf_write: elf_update failed:
> invalid section alignment
> make[5]: *** [scripts/Makefile.vmlinux_o:72: vmlinux.o] Error 1
> make[5]: *** Deleting file 'vmlinux.o'
> make[5]: Target '__default' not remade because of errors.
> make[4]: *** [Makefile:1217: vmlinux_o] Error 2
> make[4]: Target 'all' not remade because of errors.
> make[3]: *** [debian/rules:80: build-arch] Error 2
> make[3]: Target 'binary' not remade because of errors.
> dpkg-buildpackage: error: make -f debian/rules binary subprocess
> returned exit status 2
> make[2]: *** [scripts/Makefile.package:126: bindeb-pkg] Error 2
> make[1]: ***
> [/local/mnt/workspace/jjohnson/kernel/laptop-debug/Makefile:1635:
> bindeb-pkg] Error 2
> make: *** [Makefile:248: __sub-make] Error 2
> make: Target 'bindeb-pkg' not remade because of errors.
>
> This is with a simple x86 make C=1 W=1 -j8 bindeb-pkg
>
> Any thoughts?
Hi Jeff,
Sorry for the late reply, have you figured it out in the meantime?
I couldn't immediately reproduce it, so it may already be fixed
in linux-next.
My best guess is that this is an objtool issue, as new compiler
versions tend to trigger new cases that were not previously covered
in objtool.
Arnd
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: build failure with crosstools gcc 15.1.0
2025-07-04 13:25 ` build failure with crosstools gcc 15.1.0 Arnd Bergmann
@ 2025-07-24 10:44 ` Mark Rutland
2025-07-24 15:37 ` Arnd Bergmann
0 siblings, 1 reply; 5+ messages in thread
From: Mark Rutland @ 2025-07-24 10:44 UTC (permalink / raw)
To: Arnd Bergmann; +Cc: Jeff Johnson, linux-kernel, Peter Zijlstra, Josh Poimboeuf
On Fri, Jul 04, 2025 at 03:25:49PM +0200, Arnd Bergmann wrote:
> On Mon, Jun 23, 2025, at 21:52, Jeff Johnson wrote:
> > I've been using crosstools gcc 14.2.0.
> >
> > Today I saw that gcc 15.1.0 has been added to crosstools:
> > https://www.kernel.org/pub/tools/crosstool/files/bin/x86_64/15.1.0/
> >
> > But when I try it I'm getting an error:
> > LD vmlinux.o
> > vmlinux.o: warning: objtool: ncsi_process_next_channel() falls through
> > to next function ncsi_channel_monitor.cold()
> > vmlinux.o: error: objtool [elf.c:1360]: elf_write: elf_update failed:
> > invalid section alignment
> > make[5]: *** [scripts/Makefile.vmlinux_o:72: vmlinux.o] Error 1
> > make[5]: *** Deleting file 'vmlinux.o'
> > make[5]: Target '__default' not remade because of errors.
> > make[4]: *** [Makefile:1217: vmlinux_o] Error 2
> > make[4]: Target 'all' not remade because of errors.
> > make[3]: *** [debian/rules:80: build-arch] Error 2
> > make[3]: Target 'binary' not remade because of errors.
> > dpkg-buildpackage: error: make -f debian/rules binary subprocess
> > returned exit status 2
> > make[2]: *** [scripts/Makefile.package:126: bindeb-pkg] Error 2
> > make[1]: ***
> > [/local/mnt/workspace/jjohnson/kernel/laptop-debug/Makefile:1635:
> > bindeb-pkg] Error 2
> > make: *** [Makefile:248: __sub-make] Error 2
> > make: Target 'bindeb-pkg' not remade because of errors.
> >
> > This is with a simple x86 make C=1 W=1 -j8 bindeb-pkg
> >
> > Any thoughts?
>
> Hi Jeff,
>
> Sorry for the late reply, have you figured it out in the meantime?
>
> I couldn't immediately reproduce it, so it may already be fixed
> in linux-next.
FWIW, I consistently see the same objtool splat for v6.16-rc7 and
next-20250724, built with GCC 15.1.0 from the kernel.org cross
toolchains page, e.g.
$ git clean -fdx
$ usekorg 15.1.0 make ARCH=x86_64 CROSS_COMPILE=x86_64-linux- defconfig
$ usekorg 15.1.0 make ARCH=x86_64 CROSS_COMPILE=x86_64-linux- -j56
The build machine is Debian 11.10 on x86-64., and 'usekorg ${VERSION}'
is my script to put the relevant kernel.org cross toolchain binaries
into my $PATH.
Doing the same with the 14.2.0 binaries, e.g.
$ git clean -fdx
$ usekorg 14.2.0 make ARCH=x86_64 CROSS_COMPILE=x86_64-linux- defconfig
$ usekorg 14.2.0 make ARCH=x86_64 CROSS_COMPILE=x86_64-linux- -j56
... builds successfully, but there are some objtool warnings:
| LD vmlinux.o
| vmlinux.o: warning: objtool: x86_init_dev_msi_info+0x58: relocation to !ENDBR: irq_chip_retrigger_hierarchy+0x0
| vmlinux.o: warning: objtool: .export_symbol+0x3e78: data relocation to !ENDBR: irq_chip_retrigger_hierarchy+0x0
| vmlinux.o: warning: objtool: .export_symbol+0x31140: data relocation to !ENDBR: stpcpy+0x0
| vmlinux.o: warning: objtool: dmar_msi_controller+0x58: data relocation to !ENDBR: irq_chip_retrigger_hierarchy+0x0
| vmlinux.o: warning: objtool: intcapxt_controller+0x58: data relocation to !ENDBR: irq_chip_retrigger_hierarchy+0x0
| vmlinux.o: warning: objtool: hpet_msi_controller+0x58: data relocation to !ENDBR: irq_chip_retrigger_hierarchy+0x0
| vmlinux.o: warning: objtool: ioapic_ir_chip+0x58: data relocation to !ENDBR: irq_chip_retrigger_hierarchy+0x0
| vmlinux.o: warning: objtool: ioapic_chip+0x58: data relocation to !ENDBR: irq_chip_retrigger_hierarchy+0x0
Mark.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: build failure with crosstools gcc 15.1.0
2025-07-24 10:44 ` Mark Rutland
@ 2025-07-24 15:37 ` Arnd Bergmann
2025-07-25 9:08 ` Mark Rutland
0 siblings, 1 reply; 5+ messages in thread
From: Arnd Bergmann @ 2025-07-24 15:37 UTC (permalink / raw)
To: Mark Rutland; +Cc: Jeff Johnson, linux-kernel, Peter Zijlstra, Josh Poimboeuf
On Thu, Jul 24, 2025, at 12:44, Mark Rutland wrote:
> On Fri, Jul 04, 2025 at 03:25:49PM +0200, Arnd Bergmann wrote:
>> On Mon, Jun 23, 2025, at 21:52, Jeff Johnson wrote:
>> > vmlinux.o: warning: objtool: ncsi_process_next_channel() falls through
>> > to next function ncsi_channel_monitor.cold()
>> > vmlinux.o: error: objtool [elf.c:1360]: elf_write: elf_update failed:
>>
>> Sorry for the late reply, have you figured it out in the meantime?
>>
>> I couldn't immediately reproduce it, so it may already be fixed
>> in linux-next.
>
> $ git clean -fdx
> $ usekorg 15.1.0 make ARCH=x86_64 CROSS_COMPILE=x86_64-linux- defconfig
> $ usekorg 15.1.0 make ARCH=x86_64 CROSS_COMPILE=x86_64-linux- -j56
This is very close to what I use. I assume you are also on an arm64
host here?
> Doing the same with the 14.2.0 binaries, e.g.
>
> $ git clean -fdx
> $ usekorg 14.2.0 make ARCH=x86_64 CROSS_COMPILE=x86_64-linux- defconfig
> $ usekorg 14.2.0 make ARCH=x86_64 CROSS_COMPILE=x86_64-linux- -j56
>
> ... builds successfully, but there are some objtool warnings:
>
> | LD vmlinux.o
> | vmlinux.o: warning: objtool: x86_init_dev_msi_info+0x58: relocation
> to !ENDBR: irq_chip_retrigger_hierarchy+0x0
> | vmlinux.o: warning: objtool: .export_symbol+0x3e78: data relocation
> to !ENDBR: irq_chip_retrigger_hierarchy+0x0
> | vmlinux.o: warning: objtool: .export_symbol+0x31140: data relocation
> to !ENDBR: stpcpy+0x0
> | vmlinux.o: warning: objtool: dmar_msi_controller+0x58: data
> relocation to !ENDBR: irq_chip_retrigger_hierarchy+0x0
> | vmlinux.o: warning: objtool: intcapxt_controller+0x58: data
> relocation to !ENDBR: irq_chip_retrigger_hierarchy+0x0
> | vmlinux.o: warning: objtool: hpet_msi_controller+0x58: data
> relocation to !ENDBR: irq_chip_retrigger_hierarchy+0x0
> | vmlinux.o: warning: objtool: ioapic_ir_chip+0x58: data relocation to
> !ENDBR: irq_chip_retrigger_hierarchy+0x0
> | vmlinux.o: warning: objtool: ioapic_chip+0x58: data relocation to
> !ENDBR: irq_chip_retrigger_hierarchy+0x0
My build output is empty with either of those toolchains. However
I've seen a couple of other warnings on randconfig builds recently,
all of these are with gcc-15.1:
drivers/gpu/drm/msm/msm.o: warning: objtool: submit_lock_objects+0x10c: sibling call from callable instruction with modified stack frame
drivers/gpu/drm/msm/msm_gem_submit.o: warning: objtool: submit_lock_objects+0x147: sibling call from callable instruction with modified stack frame
drivers/media/cec/core/cec-adap.o: warning: objtool: cec_receive_notify.isra.0+0x6c5: ignoring unreachables due to jump table quirk
kernel/trace/rv/reactor_panic.o: warning: objtool: rv_panic_reaction(): unexpected end of section .text.unlikely
vmlinux.o: warning: objtool: hdmi_display_enable+0x145: hdmi_pll_compute() missing __noreturn in .c/.h or NORETURN() in noreturns.h
Arnd
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: build failure with crosstools gcc 15.1.0
2025-07-24 15:37 ` Arnd Bergmann
@ 2025-07-25 9:08 ` Mark Rutland
2025-07-25 15:19 ` Jeff Johnson
0 siblings, 1 reply; 5+ messages in thread
From: Mark Rutland @ 2025-07-25 9:08 UTC (permalink / raw)
To: Arnd Bergmann; +Cc: Jeff Johnson, linux-kernel, Peter Zijlstra, Josh Poimboeuf
On Thu, Jul 24, 2025 at 05:37:11PM +0200, Arnd Bergmann wrote:
> On Thu, Jul 24, 2025, at 12:44, Mark Rutland wrote:
> > On Fri, Jul 04, 2025 at 03:25:49PM +0200, Arnd Bergmann wrote:
> >> On Mon, Jun 23, 2025, at 21:52, Jeff Johnson wrote:
> >> > vmlinux.o: warning: objtool: ncsi_process_next_channel() falls through
> >> > to next function ncsi_channel_monitor.cold()
> >> > vmlinux.o: error: objtool [elf.c:1360]: elf_write: elf_update failed:
> >>
> >> Sorry for the late reply, have you figured it out in the meantime?
> >>
> >> I couldn't immediately reproduce it, so it may already be fixed
> >> in linux-next.
> >
> > $ git clean -fdx
> > $ usekorg 15.1.0 make ARCH=x86_64 CROSS_COMPILE=x86_64-linux- defconfig
> > $ usekorg 15.1.0 make ARCH=x86_64 CROSS_COMPILE=x86_64-linux- -j56
>
> This is very close to what I use. I assume you are also on an arm64
> host here?
Nope, this was on an x86-64 host running Debian 11.10.
I *DON'T* see this when building on an arm64 host running Debain 12.11,
using the (arm64 builds of) the GCC 15.1.0 binaries from kernel.org.
That suggests this is down to something on the build host. Given that
the failure is seen at a call to elf_update() (which is part of libelf):
/* Write all changes to the file. */
if (elf_update(elf->elf, ELF_C_WRITE) < 0) {
ERROR_ELF("elf_update");
return -1;
}
... I suspect the version of libelf might have something to do with it.
The x86 host has libelf-dev 0.183-1 whereas the arm64 host has
libelf-dev 0.188-2.1, so maybe there's something added or fixed between
those versions.
Otherwise, looking at the resulting .config files, the only differences
are:
* The x86 host has:
CONFIG_PAHOLE_VERSION=120
CONFIG_CC_HAS_MARCH_NATIVE=y
# CONFIG_X86_NATIVE_CPU is not set
* The arm64 host has:
CONFIG_PAHOLE_VERSION=124
... and otherwise everything else is the same.
AFAICT, pahole shouldn't affect the build since none of the BTF options
are selected.
Mark.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: build failure with crosstools gcc 15.1.0
2025-07-25 9:08 ` Mark Rutland
@ 2025-07-25 15:19 ` Jeff Johnson
0 siblings, 0 replies; 5+ messages in thread
From: Jeff Johnson @ 2025-07-25 15:19 UTC (permalink / raw)
To: Mark Rutland, Arnd Bergmann; +Cc: linux-kernel, Peter Zijlstra, Josh Poimboeuf
On 7/25/2025 2:08 AM, Mark Rutland wrote:
> ... I suspect the version of libelf might have something to do with it.
>
> The x86 host has libelf-dev 0.183-1 whereas the arm64 host has
> libelf-dev 0.188-2.1, so maybe there's something added or fixed between
> those versions.
My distro has an even older one, libelf-dev 0.176-1.1
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2025-07-25 15:19 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <8362b484-ea77-4825-8ccb-d5acad660102@oss.qualcomm.com>
2025-07-04 13:25 ` build failure with crosstools gcc 15.1.0 Arnd Bergmann
2025-07-24 10:44 ` Mark Rutland
2025-07-24 15:37 ` Arnd Bergmann
2025-07-25 9:08 ` Mark Rutland
2025-07-25 15:19 ` Jeff Johnson
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®