Allow to disable stack protector feature
Currently disabling stack protector will cause build to fail. This commit will fix that problem and allow to toggle feature when needed. Signed-off-by: Zbigniew Bodek <zbigniew.bodek@huawei.com> Change-Id: Iee8ccfdb9fce4ba69aa557e2ac915ddc45b2f21e
This commit is contained in:
parent
450f63d7b0
commit
4188734ee4
|
@ -57,7 +57,11 @@
|
||||||
.global _osExceptPrefetchAbortHdl
|
.global _osExceptPrefetchAbortHdl
|
||||||
.global _osExceptSwiHdl
|
.global _osExceptSwiHdl
|
||||||
.global _osExceptUndefInstrHdl
|
.global _osExceptUndefInstrHdl
|
||||||
|
#if defined(LOSCFG_CC_STACKPROTECTOR_ALL) || \
|
||||||
|
defined(LOSCFG_CC_STACKPROTECTOR_STRONG) || \
|
||||||
|
defined(LOSCFG_CC_STACKPROTECTOR)
|
||||||
.global __stack_chk_guard_setup
|
.global __stack_chk_guard_setup
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
.fpu vfpv4
|
.fpu vfpv4
|
||||||
|
@ -147,6 +151,9 @@
|
||||||
.endm
|
.endm
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if defined(LOSCFG_CC_STACKPROTECTOR_ALL) || \
|
||||||
|
defined(LOSCFG_CC_STACKPROTECTOR_STRONG) || \
|
||||||
|
defined(LOSCFG_CC_STACKPROTECTOR)
|
||||||
@ Description: Stack-Protector Init
|
@ Description: Stack-Protector Init
|
||||||
__stack_chk_guard_setup:
|
__stack_chk_guard_setup:
|
||||||
PUSH {FP, LR}
|
PUSH {FP, LR}
|
||||||
|
@ -156,6 +163,7 @@ __stack_chk_guard_setup:
|
||||||
ORR R2, R3, #0X80000000
|
ORR R2, R3, #0X80000000
|
||||||
STR R2, [R1]
|
STR R2, [R1]
|
||||||
POP {FP, PC}
|
POP {FP, PC}
|
||||||
|
#endif
|
||||||
|
|
||||||
@ Description: Undefined instruction exception handler
|
@ Description: Undefined instruction exception handler
|
||||||
_osExceptUndefInstrHdl:
|
_osExceptUndefInstrHdl:
|
||||||
|
|
Loading…
Reference in New Issue