mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-29 22:02:02 +00:00
tools/nolibc: stackprotector.h: add empty __stack_chk_init for !_NOLIBC_STACKPROTECTOR
Let's define an empty __stack_chk_init for the !_NOLIBC_STACKPROTECTOR branch. This allows to remove #ifdef around every call of __stack_chk_init(). Signed-off-by: Zhangjin Wu <falcon@tinylab.org> Signed-off-by: Willy Tarreau <w@1wt.eu>
This commit is contained in:
parent
1733675515
commit
d7f16723d3
1 changed files with 2 additions and 0 deletions
|
@ -45,6 +45,8 @@ void __stack_chk_init(void)
|
|||
if (__stack_chk_guard != (uintptr_t) &__stack_chk_guard)
|
||||
__stack_chk_guard ^= (uintptr_t) &__stack_chk_guard;
|
||||
}
|
||||
#else /* !defined(_NOLIBC_STACKPROTECTOR) */
|
||||
__inline__ void __stack_chk_init(void) {}
|
||||
#endif /* defined(_NOLIBC_STACKPROTECTOR) */
|
||||
|
||||
#endif /* _NOLIBC_STACKPROTECTOR_H */
|
||||
|
|
Loading…
Reference in a new issue