[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20241119022730.GA2908286@thelio-3990X>
Date: Mon, 18 Nov 2024 19:27:30 -0700
From: Nathan Chancellor <nathan@...nel.org>
To: Masahiro Yamada <masahiroy@...nel.org>
Cc: linux-kbuild@...r.kernel.org, Paul Menzel <pmenzel@...gen.mpg.de>,
Borislav Petkov <bp@...en8.de>,
Nikolay Borisov <nik.borisov@...e.com>,
Marco Elver <elver@...gle.com>,
Josh Poimboeuf <jpoimboe@...nel.org>,
Nicolas Schier <nicolas@...sle.eu>, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 2/3] kbuild: enable objtool for *.mod.o and additional
kernel objects
Hi Masahiro,
On Thu, Nov 14, 2024 at 08:45:22AM +0900, Masahiro Yamada wrote:
> Currently, objtool is disabled in scripts/Makefile.{modfinal,vmlinux}.
>
> This commit moves rule_cc_o_c and rule_as_o_S to scripts/Makefile.lib
> and set objtool-enabled to y there.
>
> With this change, *.mod.o, .module-common.o, builtin-dtb.o, and
> vmlinux.export.o will now be covered by objtool.
>
> Signed-off-by: Masahiro Yamada <masahiroy@...nel.org>
I am seeing some build failures when LTO is enabled with this change in
-next as commit d8d3f6c6690c ("kbuild: enable objtool for *.mod.o and
additional kernel objects").
$ printf 'CONFIG_LTO_%s\n' NONE=n CLANG_THIN=y >kernel/configs/thinlto.config
$ make -skj"$(nproc)" ARCH=x86_64 LLVM=1 mrproper {def,thinlto.}config all
...
.vmlinux.export.o: warning: objtool: gelf_getehdr: invalid `Elf' handle
make[4]: *** [scripts/Makefile.vmlinux:13: .vmlinux.export.o] Error 1
...
When LTO is enabled, these files are LLVM bitcode, not ELF, so objtool
can't process them:
$ file .vmlinux.export.o
.vmlinux.export.o: LLVM IR bitcode
Cheers,
Nathan
Powered by blists - more mailing lists