]> www.infradead.org Git - users/hch/misc.git/commitdiff
kbuild: Restore pattern to avoid stripping .rela.dyn from vmlinux
authorNathan Chancellor <nathan@kernel.org>
Wed, 8 Oct 2025 22:46:44 +0000 (15:46 -0700)
committerNathan Chancellor <nathan@kernel.org>
Fri, 10 Oct 2025 17:22:07 +0000 (10:22 -0700)
Commit 0ce5139fd96e ("kbuild: always create intermediate
vmlinux.unstripped") removed the pattern to avoid stripping .rela.dyn
sections added by commit e9d86b8e17e7 ("scripts: Do not strip .rela.dyn
section"). Restore it so that .rela.dyn sections remain in the final
vmlinux.

Fixes: 0ce5139fd96e ("kbuild: always create intermediate vmlinux.unstripped")
Acked-by: Ard Biesheuvel <ardb@kernel.org>
Acked-by: Alexey Gladkov <legion@kernel.org>
Acked-by: Nicolas Schier <nsc@kernel.org>
Link: https://patch.msgid.link/20251008-kbuild-fix-modinfo-regressions-v1-1-9fc776c5887c@kernel.org
Signed-off-by: Nathan Chancellor <nathan@kernel.org>
scripts/Makefile.vmlinux

index 7c6ae9886f8f76d6f0a42ec9aa43fbbe1a324167..a62639982be5bc41bcec2416c7d850eae008a3d4 100644 (file)
@@ -82,7 +82,7 @@ endif
 # ---------------------------------------------------------------------------
 
 remove-section-y                                   := .modinfo
-remove-section-$(CONFIG_ARCH_VMLINUX_NEEDS_RELOCS) += '.rel*'
+remove-section-$(CONFIG_ARCH_VMLINUX_NEEDS_RELOCS) += '.rel*' '!.rel*.dyn'
 
 remove-symbols := -w --strip-symbol='__mod_device_table__*'