Skip to content

Commit

Permalink
Add -malign-double to IA32 compiler flags
Browse files Browse the repository at this point in the history
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 #515

Signed-off-by: Nicholas Bishop <nicholasbishop@google.com>
  • Loading branch information
nicholasbishop authored and vathpela committed Nov 14, 2022
1 parent ea4911c commit 0cf43ac
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Make.defaults
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 0cf43ac

Please sign in to comment.