Re: [RFC PATCH 1/2] objtool/LoongArch: Fix fall through warning about efi_boot_kernel()

From: Tiezhu Yang
Date: Wed Aug 27 2025 - 22:01:28 EST


On 2025/8/27 上午7:39, Josh Poimboeuf wrote:
On Tue, Aug 26, 2025 at 09:03:34PM +0800, Huacai Chen wrote:

...

Then I think objtool needs to be improved to handle this case, this
problem is not arch specific.

Yeah, objtool should really be ignoring this code altogether. On x86,
that's not a problem because the EFI stub code isn't linked into
vmlinux.o. It gets linked in separately:

$ git grep vmlinux-libs
arch/x86/boot/compressed/Makefile:vmlinux-libs-$(CONFIG_EFI_STUB) += $(objtree)/drivers/firmware/efi/libstub/lib.a
arch/x86/boot/compressed/Makefile:vmlinux-libs-$(CONFIG_X86_64) += $(objtree)/arch/x86/boot/startup/lib.a
arch/x86/boot/compressed/Makefile:$(obj)/vmlinux: $(vmlinux-objs-y) $(vmlinux-libs-y) FORCE

IMO, the proper fix is to change the loongarch build to do the same.
vmlinux.o is intended to be proper kernel code.

Thank you very much, that is to say, these EFISTUB functions can be
ignored by objtool, I will do it.

Thanks,
Tiezhu