From 0cf43ac6d78c6f47f8b91210639ac1aa63665f0b Mon Sep 17 00:00:00 2001 From: Nicholas Bishop Date: Thu, 6 Oct 2022 16:08:56 -0400 Subject: [PATCH 09/13] Add -malign-double to IA32 compiler flags This changes the alignment of UINT64 data to 8 bytes on IA32, which matches EDK2's understanding of alignment. In particular this change affects the offset where shim writes `EFI_LOADED_IMAGE.ImageSize`. Fixes https://github.com/rhboot/shim/issues/515 Signed-off-by: Nicholas Bishop --- Make.defaults | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Make.defaults b/Make.defaults index dfed9c4a3c7..c46164a33ea 100644 --- a/Make.defaults +++ b/Make.defaults @@ -71,7 +71,7 @@ ifeq ($(ARCH),x86_64) endif ifeq ($(ARCH),ia32) ARCH_CFLAGS ?= -mno-mmx -mno-sse -mno-red-zone -nostdinc \ - $(CLANG_BUGS) -m32 \ + $(CLANG_BUGS) -m32 -malign-double \ -DMDE_CPU_IA32 -DPAGE_SIZE=4096 ARCH_GNUEFI ?= ia32 ARCH_SUFFIX ?= ia32 -- 2.37.1