efi/riscv: libstub: Split off kernel image relocation for builtin stub
authorArd Biesheuvel <ardb@kernel.org>
Wed, 12 Oct 2022 18:23:46 +0000 (20:23 +0200)
committerArd Biesheuvel <ardb@kernel.org>
Wed, 9 Nov 2022 11:42:03 +0000 (12:42 +0100)
commitf1a116c055e3aee0c579d39bd777c9155e8bf5d1
treebc1af50a74d98df13defd22a2f3b9972b40be3a9
parent895bc3a135ffe9475de04b30e274f57a176cd3ef
efi/riscv: libstub: Split off kernel image relocation for builtin stub

The RISC-V build of the EFI stub is part of the core kernel image, and
therefore accesses section markers directly when it needs to figure out
the size of the various section.

The zboot decompressor does not have access to those symbols, but
doesn't really need that either. So let's move handle_kernel_image()
into a separate file (or rather, move everything else into a separate
file) so that the zboot build does not pull in unused code that links to
symbols that it does not define.

Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
arch/riscv/include/asm/efi.h
drivers/firmware/efi/libstub/Makefile
drivers/firmware/efi/libstub/riscv-stub.c
drivers/firmware/efi/libstub/riscv.c [new file with mode: 0644]