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:
Zbigniew Bodek 2020-10-08 18:02:36 +08:00 committed by Wojciech Zmuda WX948747
parent 450f63d7b0
commit 4188734ee4
1 changed files with 8 additions and 0 deletions

View File

@ -57,7 +57,11 @@
.global _osExceptPrefetchAbortHdl
.global _osExceptSwiHdl
.global _osExceptUndefInstrHdl
#if defined(LOSCFG_CC_STACKPROTECTOR_ALL) || \
defined(LOSCFG_CC_STACKPROTECTOR_STRONG) || \
defined(LOSCFG_CC_STACKPROTECTOR)
.global __stack_chk_guard_setup
#endif
.fpu vfpv4
@ -147,6 +151,9 @@
.endm
#endif
#if defined(LOSCFG_CC_STACKPROTECTOR_ALL) || \
defined(LOSCFG_CC_STACKPROTECTOR_STRONG) || \
defined(LOSCFG_CC_STACKPROTECTOR)
@ Description: Stack-Protector Init
__stack_chk_guard_setup:
PUSH {FP, LR}
@ -156,6 +163,7 @@ __stack_chk_guard_setup:
ORR R2, R3, #0X80000000
STR R2, [R1]
POP {FP, PC}
#endif
@ Description: Undefined instruction exception handler
_osExceptUndefInstrHdl: