Re: extlinux can't boot kernel after commit "kbuild: keep .modinfo section in vmlinux.unstripped"
From: Nathan Chancellor
Date: Wed Feb 25 2026 - 16:24:38 EST
On Wed, Feb 25, 2026 at 11:55:06AM +0000, Ed W wrote:
> Yes, your patch works fine against my 6.18.12 kernel on my AMD64 machine and booting with extlinux
> (previously not working)
Thanks a lot for verifying! I will send this as a formal patch shortly.
I will include:
Tested-by: Ed W <lists@xxxxxxxxxxxxxx> # x86_64
in addition to a Reported-by, if that is okay with you. Let me know if
not and I will remove it before I apply the patch but I want to make
sure you get proper credit for helping out with this process.
> I also played around a little with some variations and it seems as
> though the adding in of the .modinfo into the strip is the key, caveat
> that in my messing around (based on inspiration from the commit [1]
> that you mention), I needed to reorder the macros to get it to
> compile. Note, I'm not suggestion this as a solution, just
> illustrating some extra info:
Yup, this is definitely another option but I still think including
.modinfo in ELF_DETAILS was dubious from the beginning because it is not
really a generic ELF section, hence splitting it out.
> --- arch/x86/boot/compressed/vmlinux.lds.S.orig 2026-02-25 10:42:45.040655315 +0000
> +++ arch/x86/boot/compressed/vmlinux.lds.S 2026-02-25 11:06:32.907372114 +0000
> @@ -80,17 +80,18 @@
> . = ALIGN(PAGE_SIZE); /* keep ZO size page aligned */
> _end = .;
>
> - STABS_DEBUG
> - DWARF_DEBUG
> - ELF_DETAILS
> -
> DISCARDS
> /DISCARD/ : {
> *(.dynamic) *(.dynsym) *(.dynstr) *(.dynbss)
> *(.hash) *(.gnu.hash)
> *(.note.*)
> + *(.modinfo)
> }
>
> + STABS_DEBUG
> + DWARF_DEBUG
> + ELF_DETAILS
> +
> .got.plt (INFO) : {
> *(.got.plt)
> }
>
>
> Thanks for isolating the issue!
Thanks again for reporting it and sorry that I missed it.
Cheers,
Nathan