diff options
Diffstat (limited to 'meta/recipes-kernel/kexec/kexec-tools')
-rw-r--r-- | meta/recipes-kernel/kexec/kexec-tools/0001-purgatory-Disabling-GCC-s-stack-protection.patch | 64 |
1 files changed, 64 insertions, 0 deletions
diff --git a/meta/recipes-kernel/kexec/kexec-tools/0001-purgatory-Disabling-GCC-s-stack-protection.patch b/meta/recipes-kernel/kexec/kexec-tools/0001-purgatory-Disabling-GCC-s-stack-protection.patch new file mode 100644 index 0000000000..74a838704c --- /dev/null +++ b/meta/recipes-kernel/kexec/kexec-tools/0001-purgatory-Disabling-GCC-s-stack-protection.patch | |||
@@ -0,0 +1,64 @@ | |||
1 | From 8227f5a583ad4523059ba2531263e625ac01cd40 Mon Sep 17 00:00:00 2001 | ||
2 | From: Kevin Hao <kexin.hao@windriver.com> | ||
3 | Date: Tue, 28 Apr 2015 20:25:12 +0800 | ||
4 | Subject: [PATCH] purgatory: Disabling GCC's stack protection | ||
5 | |||
6 | If the GCC's stack protection is enabled by default, the purgatory will | ||
7 | also be built with this option. But it makes no sense to enable this | ||
8 | for the purgatory code, and would cause error when we are trying to | ||
9 | relocate the purgatory codes because symbol like __stack_chk_fail is | ||
10 | unresolved. Instead of disabling this for some archs specifically, | ||
11 | disable it for all the archs. | ||
12 | |||
13 | Upstream-Status: Pending | ||
14 | |||
15 | Signed-off-by: Kevin Hao <kexin.hao@windriver.com> | ||
16 | Signed-off-by: Wenzong Fan <wenzong.fan@windriver.com> | ||
17 | --- | ||
18 | purgatory/Makefile | 3 ++- | ||
19 | purgatory/arch/ppc64/Makefile | 2 +- | ||
20 | purgatory/arch/s390/Makefile | 1 - | ||
21 | 3 files changed, 3 insertions(+), 3 deletions(-) | ||
22 | |||
23 | diff --git a/purgatory/Makefile b/purgatory/Makefile | ||
24 | index 1945702..a25b262 100644 | ||
25 | --- a/purgatory/Makefile | ||
26 | +++ b/purgatory/Makefile | ||
27 | @@ -47,7 +47,8 @@ purgatory/sha256.o: $(srcdir)/util_lib/sha256.c | ||
28 | $(PURGATORY): CC=$(TARGET_CC) | ||
29 | $(PURGATORY): CFLAGS+=$(PURGATORY_EXTRA_CFLAGS) \ | ||
30 | $($(ARCH)_PURGATORY_EXTRA_CFLAGS) \ | ||
31 | - -Os -fno-builtin -ffreestanding | ||
32 | + -Os -fno-builtin -ffreestanding \ | ||
33 | + -fno-stack-protector | ||
34 | |||
35 | $(PURGATORY): CPPFLAGS=$($(ARCH)_PURGATORY_EXTRA_CFLAGS) \ | ||
36 | -I$(srcdir)/purgatory/include \ | ||
37 | diff --git a/purgatory/arch/ppc64/Makefile b/purgatory/arch/ppc64/Makefile | ||
38 | index 6c58fa2..8ca2719 100644 | ||
39 | --- a/purgatory/arch/ppc64/Makefile | ||
40 | +++ b/purgatory/arch/ppc64/Makefile | ||
41 | @@ -9,7 +9,7 @@ ppc64_PURGATORY_SRCS += purgatory/arch/ppc64/console-ppc64.c | ||
42 | ppc64_PURGATORY_SRCS += purgatory/arch/ppc64/crashdump_backup.c | ||
43 | ppc64_PURGATORY_SRCS += purgatory/arch/ppc64/misc.S | ||
44 | |||
45 | -ppc64_PURGATORY_EXTRA_CFLAGS += -m64 -msoft-float -fno-stack-protector \ | ||
46 | +ppc64_PURGATORY_EXTRA_CFLAGS += -m64 -msoft-float \ | ||
47 | -fno-exceptions | ||
48 | ppc64_PURGATORY_EXTRA_ASFLAGS += -m64 | ||
49 | ifeq ($(SUBARCH),BE) | ||
50 | diff --git a/purgatory/arch/s390/Makefile b/purgatory/arch/s390/Makefile | ||
51 | index 09749bd..c94cc3c 100644 | ||
52 | --- a/purgatory/arch/s390/Makefile | ||
53 | +++ b/purgatory/arch/s390/Makefile | ||
54 | @@ -2,7 +2,6 @@ | ||
55 | # Purgatory s390 | ||
56 | # | ||
57 | |||
58 | -s390_PURGATORY_EXTRA_CFLAGS += -fno-stack-protector | ||
59 | s390_PURGATORY_SRCS += purgatory/arch/s390/console-s390.c | ||
60 | s390_PURGATORY_SRCS += purgatory/arch/s390/setup-s390.S | ||
61 | s390_PURGATORY_SRCS += purgatory/arch/s390/purgatory-s390.c | ||
62 | -- | ||
63 | 1.9.1 | ||
64 | |||