aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/util/elf2efi.c16
1 files changed, 15 insertions, 1 deletions
diff --git a/src/util/elf2efi.c b/src/util/elf2efi.c
index 5542b99..8af53ae 100644
--- a/src/util/elf2efi.c
+++ b/src/util/elf2efi.c
@@ -125,7 +125,21 @@
#define R_ARM_V4BX 40
#endif
-#define EFI_FILE_ALIGN 0x20
+/**
+ * Alignment of raw data of sections in the image file
+ *
+ * Some versions of signtool.exe will spuriously complain if this
+ * value is less than 512.
+ */
+#define EFI_FILE_ALIGN 0x200
+
+/**
+ * Alignment of sections when loaded into memory
+ *
+ * This must equal the architecture page size, in order to allow for
+ * the possibility of the firmware using page-level protection to
+ * enforce section attributes at runtime.
+ */
#define EFI_IMAGE_ALIGN 0x1000
struct elf_file {