[PATCH v3 3/3] riscv: fix building compressed EFI image
Andy Shevchenko
andriy.shevchenko at intel.com
Tue Apr 14 01:37:20 PDT 2026
On Mon, Apr 13, 2026 at 12:22:02PM +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_EXTRAS to
> manage linking of lib-ashldi3.o lib-lshrdi3.o on riscv32 only.
> Reviewed-and-tested-by: Charlie Jenkins <thecharlesjenkins at gmail.com>
At most we use Reported-and-tested (as they have at least some relationship),
but these two (and in general the combined tags are discouraged) must be split.
> Signed-off-by: Dmitry Antipov <dmantipov at yandex.ru>
...
> +config EFI_ZBOOT_EXTRAS
Can we name them rather after libgcc?
Exempli gratia
config EFI_ZBOOT_USE_LIBGCC
?
> + bool
> + default y if RISCV && 32BIT
--
With Best Regards,
Andy Shevchenko
More information about the linux-riscv
mailing list