mirror of
https://github.com/torvalds/linux.git
synced 2026-04-18 06:44:00 -04:00
kbuild,objtool: Defer objtool validation step for CONFIG_KLP_BUILD
In preparation for klp-build, defer objtool validation for CONFIG_KLP_BUILD kernels until the final pre-link archive (e.g., vmlinux.o, module-foo.o) is built. This will simplify the process of generating livepatch modules. Delayed objtool is generally preferred anyway, and is already standard for IBT and LTO. Eventually the per-translation-unit mode will be phased out. Acked-by: Petr Mladek <pmladek@suse.com> Tested-by: Joe Lawrence <joe.lawrence@redhat.com> Signed-off-by: Josh Poimboeuf <jpoimboe@kernel.org>
This commit is contained in:
@@ -60,7 +60,8 @@ vmlinux_link()
|
||||
# skip output file argument
|
||||
shift
|
||||
|
||||
if is_enabled CONFIG_LTO_CLANG || is_enabled CONFIG_X86_KERNEL_IBT; then
|
||||
if is_enabled CONFIG_LTO_CLANG || is_enabled CONFIG_X86_KERNEL_IBT ||
|
||||
is_enabled CONFIG_KLP_BUILD; then
|
||||
# Use vmlinux.o instead of performing the slow LTO link again.
|
||||
objs=vmlinux.o
|
||||
libs=
|
||||
|
||||
Reference in New Issue
Block a user