aboutsummaryrefslogtreecommitdiffstats
path: root/mk
diff options
context:
space:
mode:
authorMatt Fleming <matt.fleming@intel.com>2012-11-19 13:56:12 +0000
committerMatt Fleming <matt.fleming@intel.com>2012-11-21 16:06:16 +0000
commit94113555e41e68dedce46983b6d2b97d0348f65a (patch)
tree5a6852cb8a43457d509abbc2c1a606018bdf3032 /mk
parent183382e7e6c7a9f6432816e105e1b13f6ea6f2db (diff)
downloadsyslinux-94113555e41e68dedce46983b6d2b97d0348f65a.tar.gz
syslinux-94113555e41e68dedce46983b6d2b97d0348f65a.tar.xz
syslinux-94113555e41e68dedce46983b6d2b97d0348f65a.zip
efi: Add -mno-red-zone to CFLAGSsyslinux-6.00-pre2
The 'red zone' is a 128-byte area at the bottom of the stack frame and is defined as part of the SysV Application Binary Interface. However, UEFI firmware uses the Microsoft ABI, rather than the SysV ABI, and our red zone can become corrupt if we don't turn it off. Signed-off-by: Matt Fleming <matt.fleming@intel.com>
Diffstat (limited to 'mk')
-rw-r--r--mk/efi.mk5
1 files changed, 3 insertions, 2 deletions
diff --git a/mk/efi.mk b/mk/efi.mk
index af25f98d..02817953 100644
--- a/mk/efi.mk
+++ b/mk/efi.mk
@@ -38,8 +38,9 @@ CFLAGS = -I$(EFIINC) -I$(EFIINC)/$(EFI_SUBARCH) \
-DEFI_FUNCTION_WRAPPER -fPIC -fshort-wchar -ffreestanding \
-Wall -I$(com32)/include -I$(com32)/include/sys \
-I$(core)/include -I$(core)/ $(CARCHOPT) \
- -I$(com32)/lib/ -I$(com32)/libutil/include -std=gnu99 -DELF_DEBUG -DSYSLINUX_EFI \
- $(GCCWARN) -D__COM32__
+ -I$(com32)/lib/ -I$(com32)/libutil/include -std=gnu99 \
+ -DELF_DEBUG -DSYSLINUX_EFI \
+ $(GCCWARN) -D__COM32__ -mno-red-zone
# gnuefi sometimes installs these under a gnuefi/ directory, and sometimes not
CRT0 := $(shell find $(LIBDIR) -name crt0-efi-$(EFI_SUBARCH).o 2>/dev/null | tail -n1)