Skip to contentSkip to conversation

ppc64/purgatory: Disabling GCC's stack protection

PATCH Superseded Laurent Dufour 2 participants 3 messages Mar 25, 2014 – Apr 9, 2014

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ppc64/purgatory: Disabling GCC's stack protection

Some Linux distributions, like Suse, are turning on the GCC's stack protection mechanism by default (-fstack-protector). When building the purgatory with this option, this leads to link issues that are revealed at runtime when the purgatory is loaded because symbols like __stack_chk_fail are unresolved.

This patch forces this stack protection mechanism to be turned off when building the purgatory on ppc64 BE and LE.

---
 purgatory/arch/ppc64/Makefile |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
purgatory/arch/ppc64/Makefile +1 -1
index 31076e9..712e2b1 100644
@@ -9,7 +9,7 @@ ppc64_PURGATORY_SRCS += purgatory/arch/ppc64/console-ppc64.c
 ppc64_PURGATORY_SRCS += purgatory/arch/ppc64/crashdump_backup.c
 ppc64_PURGATORY_SRCS += purgatory/arch/ppc64/misc.S
 
-ppc64_PURGATORY_EXTRA_CFLAGS += -m64 -msoft-float
+ppc64_PURGATORY_EXTRA_CFLAGS += -m64 -msoft-float -fno-stack-protector
 ppc64_PURGATORY_EXTRA_ASFLAGS += -m64
 ifeq ($(SUBARCH),BE)
 	ppc64_PURGATORY_EXTRA_LDFLAGS += -melf64ppc

_______________________________________________
kexec mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec

#1 lore raw

PATCH RESEND 1/1 ppc64/purgatory: Disabling GCC's stack protection

Some Linux distributions, like Suse, are turning on the GCC's stack protection mechanism by default (-fstack-protector). When building the purgatory with this option, this leads to link issues that are revealed at runtime when the purgatory is loaded because symbols like __stack_chk_fail are unresolved.

This patch forces this stack protection mechanism to be turned off when building the purgatory on ppc64 BE and LE.

---
 purgatory/arch/ppc64/Makefile |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
purgatory/arch/ppc64/Makefile +1 -1
index 31076e9..712e2b1 100644
@@ -9,7 +9,7 @@ ppc64_PURGATORY_SRCS += purgatory/arch/ppc64/console-ppc64.c
 ppc64_PURGATORY_SRCS += purgatory/arch/ppc64/crashdump_backup.c
 ppc64_PURGATORY_SRCS += purgatory/arch/ppc64/misc.S
 
-ppc64_PURGATORY_EXTRA_CFLAGS += -m64 -msoft-float
+ppc64_PURGATORY_EXTRA_CFLAGS += -m64 -msoft-float -fno-stack-protector
 ppc64_PURGATORY_EXTRA_ASFLAGS += -m64
 ifeq ($(SUBARCH),BE)
 	ppc64_PURGATORY_EXTRA_LDFLAGS += -melf64ppc

_______________________________________________
kexec mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec

Applied
#2 lore raw
Quoted 10 lines · Laurent Dufour

Some Linux distributions, like Suse, are turning on the GCC's stack protection mechanism by default (-fstack-protector). When building the purgatory with this option, this leads to link issues that are revealed at runtime when the purgatory is loaded because symbols like __stack_chk_fail are unresolved.

This patch forces this stack protection mechanism to be turned off when building the purgatory on ppc64 BE and LE.

Thanks, applied.

_______________________________________________
kexec mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec