aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'arch/x86/kernel/Makefile')
-rw-r--r--arch/x86/kernel/Makefile18
1 files changed, 18 insertions, 0 deletions
diff --git a/arch/x86/kernel/Makefile b/arch/x86/kernel/Makefile
index 37fa30bada17..b1f8be33300d 100644
--- a/arch/x86/kernel/Makefile
+++ b/arch/x86/kernel/Makefile
@@ -24,6 +24,24 @@ CFLAGS_vsyscall_64.o := $(PROFILING) -g0 $(nostackp)
24CFLAGS_hpet.o := $(nostackp) 24CFLAGS_hpet.o := $(nostackp)
25CFLAGS_tsc.o := $(nostackp) 25CFLAGS_tsc.o := $(nostackp)
26CFLAGS_paravirt.o := $(nostackp) 26CFLAGS_paravirt.o := $(nostackp)
27#
28# On x86_32, register frame is passed verbatim on stack as struct
29# pt_regs. gcc considers the parameter to belong to the callee and
30# with -fstack-protector it copies pt_regs to the callee's stack frame
31# to put the structure after the stack canary causing changes made by
32# the exception handlers to be lost. Turn off stack protector for all
33# files containing functions which take struct pt_regs from register
34# frame.
35#
36# The proper way to fix this is to teach gcc that the argument belongs
37# to the caller for these functions, oh well...
38#
39ifdef CONFIG_X86_32
40CFLAGS_process_32.o := $(nostackp)
41CFLAGS_vm86_32.o := $(nostackp)
42CFLAGS_signal.o := $(nostackp)
43CFLAGS_traps.o := $(nostackp)
44endif
27 45
28obj-y := process_$(BITS).o signal.o entry_$(BITS).o 46obj-y := process_$(BITS).o signal.o entry_$(BITS).o
29obj-y += traps.o irq.o irq_$(BITS).o dumpstack_$(BITS).o 47obj-y += traps.o irq.o irq_$(BITS).o dumpstack_$(BITS).o