aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/tools/include/nolibc/arch-loongarch.h
diff options
context:
space:
mode:
authorThomas Weißschuh <linux@weissschuh.net>2023-05-24 08:44:44 +0200
committerPaul E. McKenney <paulmck@kernel.org>2023-06-09 11:46:08 -0700
commite76b70dec9c257f4ccebd7f98d1de97ed071f0d1 (patch)
tree456bf7d0012877ac615cb4264811d326d33c7718 /tools/include/nolibc/arch-loongarch.h
parenttools/nolibc: simplify stackprotector compiler flags (diff)
downloadwireguard-linux-e76b70dec9c257f4ccebd7f98d1de97ed071f0d1.tar.xz
wireguard-linux-e76b70dec9c257f4ccebd7f98d1de97ed071f0d1.zip
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>
Diffstat (limited to 'tools/include/nolibc/arch-loongarch.h')
-rw-r--r--tools/include/nolibc/arch-loongarch.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/include/nolibc/arch-loongarch.h b/tools/include/nolibc/arch-loongarch.h
index d8ea7e787df4..ad3f266e7093 100644
--- a/tools/include/nolibc/arch-loongarch.h
+++ b/tools/include/nolibc/arch-loongarch.h
@@ -172,7 +172,7 @@ const unsigned long *_auxv __attribute__((weak));
#endif
/* startup code */
-void __attribute__((weak,noreturn,optimize("omit-frame-pointer"),no_stack_protector)) _start(void)
+void __attribute__((weak,noreturn,optimize("omit-frame-pointer"))) __no_stack_protector _start(void)
{
__asm__ volatile (
#ifdef _NOLIBC_STACKPROTECTOR