tools/nolibc: fix segfaults on compilers without attribute no_stack_protector
authorThomas Weißschuh <linux@weissschuh.net>
Wed, 24 May 2023 06:44:44 +0000 (08:44 +0200)
committerPaul E. McKenney <paulmck@kernel.org>
Fri, 9 Jun 2023 18:46:08 +0000 (11:46 -0700)
commite76b70dec9c257f4ccebd7f98d1de97ed071f0d1
tree456bf7d0012877ac615cb4264811d326d33c7718
parent0093c2dae8d37595c3c7fcc626b51300699a003b
tools/nolibc: fix segfaults on compilers without attribute no_stack_protector

Not all compilers, notably GCC < 10, have support for
__attribute__((no_stack_protector)).
Fall back to a mechanism that also works there.

Tested with GCC 9.5.0 from kernel.org crosstools.

Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
Signed-off-by: Willy Tarreau <w@1wt.eu>
Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
tools/include/nolibc/arch-aarch64.h
tools/include/nolibc/arch-arm.h
tools/include/nolibc/arch-i386.h
tools/include/nolibc/arch-loongarch.h
tools/include/nolibc/arch-mips.h
tools/include/nolibc/arch-riscv.h
tools/include/nolibc/arch-x86_64.h
tools/include/nolibc/compiler.h
tools/include/nolibc/stackprotector.h