Re: [PATCH 12/27] kbuild: Defer running objtool to link time for all CFG features

Nathan Chancellor <[email protected]>
Newsgroups gmane.linux.kbuild.devel,gmane.linux.kernel,gmane.linux.kernel.rust
Message-ID <20260828175708.GA3403925@ax162>
Hi Josh,

On Thu, Aug 27, 2026 at 09:51:41PM -0700, Josh Poimboeuf wrote:
> diff --git a/scripts/Makefile.vmlinux_o b/scripts/Makefile.vmlinux_o
> index 9bac917e8b819..df1e3584883e6 100644
> --- a/scripts/Makefile.vmlinux_o
> +++ b/scripts/Makefile.vmlinux_o
> @@ -30,20 +30,12 @@ endif
>  # objtool for vmlinux.o
>  # ---------------------------------------------------------------------------
>  #
> -# For CONFIG_OBJTOOL_DEFERRED (IBT or LTO), objtool doesn't run on individual
> -# translation units.  Instead it runs on vmlinux.o.
> -#
> -# For !CONFIG_OBJTOOL_DEFERRED + CONFIG_NOINSTR_VALIDATION, it runs on both
> -# translation units and vmlinux.o, with the latter only used for noinstr/unret
> -# validation.
> +# For CONFIG_OBJTOOL_DEFERRED, objtool doesn't run on individual translation
> +# units.  Instead it runs on vmlinux.o.
>  
> -objtool-enabled := $(or $(CONFIG_OBJTOOL_DEFERRED),$(CONFIG_NOINSTR_VALIDATION))
> +objtool-enabled := $(CONFIG_OBJTOOL_DEFERRED)
>  
> -ifeq ($(CONFIG_OBJTOOL_DEFERRED),y)
>  vmlinux-objtool-args-y					+= $(objtool-args-y)
> -else
> -vmlinux-objtool-args-$(CONFIG_OBJTOOL_WERROR)		+= --werror

Did you mean to drop this line or did it accidentally get culled in
cleaning up the conditional statements?

> -endif
>  
>  vmlinux-objtool-args-$(CONFIG_NOINSTR_VALIDATION)	+= --noinstr \
>  							   $(if $(or $(CONFIG_MITIGATION_UNRET_ENTRY),$(CONFIG_MITIGATION_SRSO)), --unret)

-- 
Cheers,
Nathan
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.