From 46f3e4762ba8f3091746f6219232801d20b60c41 Mon Sep 17 00:00:00 2001 From: Dmitry Baryshkov Date: Sun, 28 Jul 2024 21:20:53 +0300 Subject: [PATCH] Increase EFI file alignment Although file alignment for EFI apps is not clear, most of the UEFI accept defaulf file alignment (0x200). Nevertheless some of the UEFI bootloaders require file alignment to be 0x1000 (e.g. Lenovo Miix 630, Lenovo Yoga C630, etc). Increase file alignment to the desired value. Fixes #670 Signed-off-by: Dmitry Baryshkov --- Makefile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Makefile b/Makefile index 1698186d7..2f422a98f 100644 --- a/Makefile +++ b/Makefile @@ -269,6 +269,7 @@ endif -j .dynamic -j .rodata -j .rel* \ -j .rela* -j .dyn -j .reloc -j .eh_frame \ -j .vendor_cert -j .sbat -j .sbatlevel \ + --file-alignment 0x1000 \ $(FORMAT) $< $@ ./post-process-pe -vv $(POST_PROCESS_PE_FLAGS) $@ @@ -288,6 +289,7 @@ endif -j .debug_info -j .debug_abbrev -j .debug_aranges \ -j .debug_line -j .debug_str -j .debug_ranges \ -j .note.gnu.build-id \ + --file-alignment 0x1000 \ $< $@ ifneq ($(origin ENABLE_SBSIGN),undefined)