Date: Sun, 15 Feb 2026 13:56:11 +0000 From: Ahmad Khalifa <vexeduxr@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: git: a60e7e6ff0ec - main - stand: compile ia32 EFI loader with -malign-double Message-ID: <6991d07b.43f21.696cde4f@gitrepo.freebsd.org>
index | next in thread | raw e-mail
The branch main has been updated by vexeduxr: URL: https://cgit.FreeBSD.org/src/commit/?id=a60e7e6ff0ec1fdd66c2568ac6c03b843dbb3c9d commit a60e7e6ff0ec1fdd66c2568ac6c03b843dbb3c9d Author: Ahmad Khalifa <vexeduxr@FreeBSD.org> AuthorDate: 2026-02-15 12:23:26 +0000 Commit: Ahmad Khalifa <vexeduxr@FreeBSD.org> CommitDate: 2026-02-15 13:30:06 +0000 stand: compile ia32 EFI loader with -malign-double The UEFI spec says: > Structures are aligned on boundaries equal to the largest internal > datum of the structure and internal data are implicitly padded to > achieve natural alignment. By default, structs containing members of type "long long" have 4 byte alignment on i386. This caused some EFI structures to be subtly wrong. Fix this by compiling the ia32 EFI loader with -malign-double, which bumps the alignment up to 8 if such members are present. MFC after: 3 days --- stand/efi/loader/arch/i386/Makefile.inc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/stand/efi/loader/arch/i386/Makefile.inc b/stand/efi/loader/arch/i386/Makefile.inc index e27b553c6bab..89fcb2a3c093 100644 --- a/stand/efi/loader/arch/i386/Makefile.inc +++ b/stand/efi/loader/arch/i386/Makefile.inc @@ -7,3 +7,5 @@ SRCS+= amd64_tramp.S \ SRCS+= nullconsole.c \ comconsole.c \ spinconsole.c + +CFLAGS+= -malign-doublehome | help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?6991d07b.43f21.696cde4f>
