efi/zboot: arm64: Grab code size from ELF symbol in payload
authorArd Biesheuvel <ardb@kernel.org>
Tue, 18 Apr 2023 13:49:52 +0000 (15:49 +0200)
committerArd Biesheuvel <ardb@kernel.org>
Wed, 26 Apr 2023 21:06:48 +0000 (23:06 +0200)
commit026b85796ab4d52af56f8a1c60d2613983ecd845
tree95f62e56bf1dde770b51dcaada8fad9a9cf26656
parent45dd403da851124412d32e3193c21de4a51d29da
efi/zboot: arm64: Grab code size from ELF symbol in payload

Instead of relying on a dodgy dd hack to copy the image code size from
the uncompressed image's PE header to the end of the compressed image,
let's grab the code size from the symbol that is injected into the ELF
object by the Kbuild rules that generate the compressed payload.

Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
Acked-by: Mark Rutland <mark.rutland@arm.com>
drivers/firmware/efi/libstub/Makefile.zboot
drivers/firmware/efi/libstub/arm64.c
drivers/firmware/efi/libstub/efistub.h
drivers/firmware/efi/libstub/zboot.c