mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Ed W <lists@wildgooses.com>
To: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	masahiroy@kernel.org, nathan@kernel.org
Subject: extlinux can't boot kernel after commit "kbuild: keep .modinfo section in vmlinux.unstripped"
Date: Tue, 17 Feb 2026 19:24:36 +0000	[thread overview]
Message-ID: <587f25e0-a80e-46a5-9f01-87cb40cfa377@wildgooses.com> (raw)

Hi, I wonder if I can get some help debugging a problem post the following commit. After trying to
upgrade to a newer kernel build I encountered boot failures on my amd64 machine, booting via
extlinux and git bisect narrowed it down to this commit:


https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.19.2&id=3e86e4d74c0490e5fc5a7f8de8f29e7579c9ffe5
kbuild: keep .modinfo section in vmlinux.unstripped
Keep the .modinfo section during linking, but strip it from the final vmlinux. 
Adjust scripts/mksysmap to exclude modinfo symbols from kallsyms. 
This change will allow the next commit to extract the .modinfo section from the vmlinux.unstripped
intermediate.


The symptoms are that prior to this commit I can boot a kernel built using gcc-15 and binutils
2.45.1, however, adding that commit, or trying kernels up to 6.18.12, all fail to boot the bzImage file.
 
Extlinux apparently won't read (or otherwise rejects as invalid) the resulting bzImage kernel with
error:
    failed: I/O error
So it doesn't even try to run the kernel, it appears to fail reading from disk (and presumably
locating the entry point for execution?)

Kernel is relocatable and hence ends up being built with 
VMLINUX_NEEDS_RELOCS=y

Curiously, if I build with clang then the resulting kernels all seem to work without a problem??

System is one of a cluster of Ryzen 9 5950X, but similar errors appear with older Ryzen 9 3900
boxes. Underlying OS is gentoo, so packages approximately as per latest releases with that.

I'm not sure how to narrow down what precisely triggers the boot failure though. For example I see
similar results to the following on both a working 6.17.0 and a broken 6.18.12

# readelf -l vmlinux | grep -A3 LOAD
  LOAD           0x0000000000200000 0xffffffff81000000 0x0000000001000000
                 0x0000000002a8b4d0 0x0000000002a8b4d0  R E    0x200000
  LOAD           0x0000000002e00000 0xffffffff83c00000 0x0000000003c00000
                 0x0000000001a00000 0x0000000001a00000  RW     0x200000
  NOTE           0x0000000002c8b47c 0xffffffff83a8b47c 0x0000000003a8b47c
                 0x0000000000000054 0x0000000000000054         0x4

On the non working 6.18.12 I see:
# readelf -S vmlinux.unstripped | grep modinfo
  [70] .modinfo          PROGBITS         ffffffff85600000  04800000
# readelf -S vmlinux | grep modinfo

So it seems as though the modinfo sectors ARE being stripped?!

My guess is that something has moved or become re-ordered such that the extlinux is rejecting the
image?? 

At this point I'm honestly not quite sure what I am doing, so would some kind soul please help me
figure out what is happening? I apologise in advance that I've likely not given enough information
about the problem, please be gentle...

Ed W


             reply	other threads:[~2026-02-17 19:27 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-02-17 19:24 Ed W [this message]
2026-02-24 12:11 ` Thorsten Leemhuis
2026-02-24 20:46   ` Nathan Chancellor
2026-02-25 11:55     ` Ed W
2026-02-25 21:24       ` Nathan Chancellor

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=587f25e0-a80e-46a5-9f01-87cb40cfa377@wildgooses.com \
    --to=lists@wildgooses.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=masahiroy@kernel.org \
    --cc=nathan@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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®