Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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 rhboot#515

Signed-off-by: Nicholas Bishop <[email protected]>
nicholasbishop authored and brianredbeard committed Feb 22, 2024
1 parent d2ab0d2 commit 04bb3a6
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
@@ -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

0 comments on commit 04bb3a6

Please sign in to comment.