From: "Ard Biesheuvel" <ardb@kernel.org>
To: "Dmitry Antipov" <dmantipov@yandex.ru>
Cc: "Paul Walmsley" <pjw@kernel.org>,
"Palmer Dabbelt" <palmer@dabbelt.com>,
"Albert Ou" <aou@eecs.berkeley.edu>,
"Huacai Chen" <chenhuacai@kernel.org>,
"WANG Xuerui" <kernel@xen0n.name>,
linux-efi@vger.kernel.org, linux-riscv@lists.infradead.org,
loongarch@lists.linux.dev, "kernel test robot" <lkp@intel.com>
Subject: Re: [PATCH] efi/libstub: fix building loongarch32 without zboot enabled
Date: Thu, 26 Nov 2026 11:27:39 +0100 [thread overview]
Message-ID: <088e4dcc-8f8d-4b89-b33f-8ec39fb857ae@app.fastmail.com> (raw)
In-Reply-To: <20261126101452.590895-1-dmantipov@yandex.ru>
On Thu, 26 Nov 2026, at 11:14, Dmitry Antipov wrote:
> Kernel test robot has reported the following error observed on loongarch:
>
> loongarch64-linux-ld:
> ./drivers/firmware/efi/libstub/lib-cmdline.stub.o: in function
> `__efistub_.L47':
> __efistub_cmdline.c:(.init.text+0x258): undefined reference to
> `__efistub___ashldi3'
> loongarch64-linux-ld: __efistub_cmdline.c:(.init.text+0x268): undefined
> reference to `__efistub___lshrdi3'
>
> Since this happens with CONFIG_EFI_GENERIC_STUB enabled but
> CONFIG_EFI_ZBOOT disabled, tweak loongarch32 build to hook
> extra library objects on the former rather than latter. And
> this quirk seems no longer neeeded on riscv32 because it has
> architecture-specific implementations of ashldi3() and lsrdi3()
> which are aliased to corresponding EFI stubs via
> arch/riscv/kernel/image-vars.h.
>
> Reported-by: kernel test robot <lkp@intel.com>
> Closes:
> https://lore.kernel.org/oe-kbuild-all/20261122125352.gAcg5yLx-lkp@intel.com/
> Fixes: 442082297e3d ("riscv: fix building compressed EFI image")
> Signed-off-by: Dmitry Antipov <dmantipov@yandex.ru>
> ---
> drivers/firmware/efi/libstub/Makefile | 10 +++++-----
> 1 file changed, 5 insertions(+), 5 deletions(-)
>
Would this work as well?
--- a/arch/loongarch/kernel/image-vars.h
+++ b/arch/loongarch/kernel/image-vars.h
@@ -8,7 +8,8 @@
#ifdef CONFIG_EFI_STUB
__efistub_strcmp = strcmp;
-
+__efistub___lshrdi3 = __lshrdi3;
+__efistub___ashldi3 = __ashldi3;
#endif
#endif /* __LOONGARCH_KERNEL_IMAGE_VARS_H */
prev parent reply other threads:[~2026-11-26 10:28 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-26 10:14 [PATCH] efi/libstub: fix building loongarch32 without zboot enabled Dmitry Antipov
2026-11-26 10:26 ` sashiko-bot
2026-11-26 10:27 ` Ard Biesheuvel [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=088e4dcc-8f8d-4b89-b33f-8ec39fb857ae@app.fastmail.com \
--to=ardb@kernel.org \
--cc=aou@eecs.berkeley.edu \
--cc=chenhuacai@kernel.org \
--cc=dmantipov@yandex.ru \
--cc=kernel@xen0n.name \
--cc=linux-efi@vger.kernel.org \
--cc=linux-riscv@lists.infradead.org \
--cc=lkp@intel.com \
--cc=loongarch@lists.linux.dev \
--cc=palmer@dabbelt.com \
--cc=pjw@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox