diff options
author | Ilias Apalodimas <ilias.apalodimas@linaro.org> | 2025-01-16 12:39:05 +0100 |
---|---|---|
committer | Heinrich Schuchardt <heinrich.schuchardt@canonical.com> | 2025-01-17 20:31:25 +0100 |
commit | 75fe33973c9f27008319a87bc2dde3b2101b34f1 (patch) | |
tree | 31ec71280def181ce4ec966100365c2c0d58075c /arch/arm/lib/acpi_table.c | |
parent | 3e4eb3e25912f7f9b846ee1a4ddceda18ceb0572 (diff) |
efi_loader: Fix section alignment on EFI binaries
When creating EFI binaries, the alignment of the text section isn't
correctly factored in. As a result trying to load signed EFI binaries
throws an error with:
efi_image_region_add() efi_image_region_add: new region already part of another
Image not authenticated
Running the binary through sbverify has a similar warning
sbverify ./lib/efi_loader/helloworld.efi
warning: gap in section table:
.text : 0x00001000 - 0x00001c00,
.data : 0x00002000 - 0x00002200,
gaps in the section table may result in different checksums
warning: data remaining[7680 vs 12720]: gaps between PE/COFF sections?
.....
If we include the alignment in the text section, the signed binary boots
fine, and the relevant sbverify warning goes away
sbverify ./lib/efi_loader/helloworld.efi
warning: data remaining[8704 vs 12720]: gaps between PE/COFF sections?
.....
We should look into the remaining warning at some point as well
regarding the gaps between PE/COFF sections.
Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Diffstat (limited to 'arch/arm/lib/acpi_table.c')
0 files changed, 0 insertions, 0 deletions