[PATCH v4 3/3] riscv: fix building compressed EFI image

Andy Shevchenko andriy.shevchenko at intel.com
Wed Apr 15 02:52:55 PDT 2026


On Tue, Apr 14, 2026 at 01:26:08PM +0300, Dmitry Antipov wrote:
> When building vmlinuz.efi with CONFIG_EFI_ZBOOT enabled,
> '__lshrdi3()' is also needed to fix yet another link error:
> 
> riscv32-linux-gnu-ld: drivers/firmware/efi/libstub/lib-cmdline.stub.o: in function `__efistub_.L49':
> __efistub_cmdline.c:(.init.text+0x202): undefined reference to `__efistub___lshrdi3'
> 
> And since riscv64 can have CONFIG_EFI_ZBOOT but doesn't need these
> library routines, introduce CONFIG_EFI_ZBOOT_USE_LIBGCC to manage
> linking of lib-ashldi3.o and lib-lshrdi3.o on riscv32 only.

Acked-by: Andy Shevchenko <andriy.shevchenko at intel.com>

I think you need a tag from Ard on this.

-- 
With Best Regards,
Andy Shevchenko





More information about the linux-riscv mailing list