Re: [PATCH 0/2] kbuild: link-vmlinux.sh: more reliable 3rd pass linking

Nicolas Schier <[email protected]> Mon, 3 Aug 2026 16:11:48 +0200
Newsgroups org.kernel.vger.linux-kbuild,dev.linux.lists.llvm,org.kernel.vger.linux-kernel
Message-ID <178576605143.3450455.8523568280108508915.b4-ty@b4>
On Tue, 28 Jul 2026 13:42:38 +0100, André Draszik wrote:
> link-vmlinux.sh currently only uses the file size of
> .tmp_vmlinux?.kallsyms.o to determine if it needs to do a third pass. I
> was hitting a case where file size didn't change, but symbols changed
> sufficiently to still move subsequent symbols in vmlinux to invalidate
> kallsyms.
> 
> In particular kallsyms_names grew by one byte between
> .tmp_vmlinux1.kallsyms.o and .tmp_vmlinux2.kallsyms.o, moving the next
> symbol to the next alignment offset (4 bytes), moving many subsequent
> symbols in the final vmlinux image in turn (until abosrbed by further
> alignment instructions). This failed the final link with:
> 
> [...]

Applied to kbuild tree (kbuild-next-unstable), thanks!

[1/2] kallsyms: add symbol size for kallsyms symbols that can change size
      https://git.kernel.org/kbuild/c/bcd29ffd12f8
[2/2] kbuild: link-vmlinux.sh: improve detection of third pass requirement
      https://git.kernel.org/kbuild/c/3ef272de13d4

Please look out for regression or issue reports or other follow up
comments, as they may result in the patch/series getting dropped,
reverted or modified (e.g. trailers).

Patches applied to a kbuild-*-unstable branch are accepted pending
wider testing in linux-next and any post-commit review; they will
generally be moved to the main branch (kbuild-next or kbuild-fixes)
in about a week if no issues are found.

Best regards,
-- 
Nicolas