[PATCH 1/4] efi_loader: Fix section alignment on EFI binaries

Heinrich Schuchardt heinrich.schuchardt at canonical.com
Tue Jan 14 11:29:49 CET 2025


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

Except for the fixing each linker script individually carve out a linker
script include for ARM and RISC-V.

Heinrich Schuchardt (3):
  scripts/Makefile.lib: add -L option to LD command for EFI binaries
  efi_loader: use INCLUDE in EFI linker scripts
  efi_loader: use include in ARM EFI linker script

Ilias Apalodimas (1):
  efi_loader: Fix section alignment on EFI binaries

 arch/arm/lib/crt0_arm_efi.S        | 37 +++++++--------
 arch/arm/lib/elf_aarch64_efi.lds   | 68 +--------------------------
 arch/arm/lib/elf_arm_efi.lds       | 71 +---------------------------
 arch/riscv/lib/elf_riscv32_efi.lds | 68 +--------------------------
 arch/riscv/lib/elf_riscv64_efi.lds | 68 +--------------------------
 lib/efi_loader/elf_efi.ldsi        | 74 ++++++++++++++++++++++++++++++
 scripts/Makefile.lib               |  4 +-
 7 files changed, 99 insertions(+), 291 deletions(-)
 create mode 100644 lib/efi_loader/elf_efi.ldsi

-- 
2.47.1



More information about the U-Boot mailing list