Skip to content

Commit 470b2dd

Browse files
Matthew Garrettgregkh
authored andcommitted
efi: Build EFI stub with EFI-appropriate options
commit 9dead5b upstream. We can't assume the presence of the red zone while we're still in a boot services environment, so we should build with -fno-red-zone to avoid problems. Change the size of wchar at the same time to make string handling simpler. Signed-off-by: Matthew Garrett <mjg@redhat.com> Signed-off-by: Matt Fleming <matt.fleming@intel.com> Acked-by: Josh Boyer <jwboyer@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent f66a52d commit 470b2dd

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

arch/x86/boot/compressed/Makefile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,9 @@ VMLINUX_OBJS = $(obj)/vmlinux.lds $(obj)/head_$(BITS).o $(obj)/misc.o \
2828
$(obj)/string.o $(obj)/cmdline.o $(obj)/early_serial_console.o \
2929
$(obj)/piggy.o
3030

31+
$(obj)/eboot.o: KBUILD_CFLAGS += -fshort-wchar -mno-red-zone
32+
$(obj)/efi_stub_$(BITS).o: KBUILD_CLFAGS += -fshort-wchar -mno-red-zone
33+
3134
ifeq ($(CONFIG_EFI_STUB), y)
3235
VMLINUX_OBJS += $(obj)/eboot.o $(obj)/efi_stub_$(BITS).o
3336
endif

0 commit comments

Comments
 (0)