summaryrefslogtreecommitdiff
path: root/tools/include
diff options
context:
space:
mode:
authorThomas Weißschuh <linux@weissschuh.net>2023-05-24 19:27:06 +0300
committerPaul E. McKenney <paulmck@kernel.org>2023-06-09 21:46:09 +0300
commit79d8d4cad2252dd69076cc7997e56459baf523b1 (patch)
treef9d136427cd7a3ad4b35e148ae6da36fb3a89ca0 /tools/include
parente76b70dec9c257f4ccebd7f98d1de97ed071f0d1 (diff)
downloadlinux-79d8d4cad2252dd69076cc7997e56459baf523b1.tar.xz
tools/nolibc: s390: disable stackprotector in _start
s390 does not support the "global" stack protector mode that is implemented in nolibc. Now that nolibc detects if stack protectors are enabled at runtime it could happen that a future compiler does indeed use global mode on and nolibc would compile but segfault at runtime. To avoid this hypothetic case and to align s390 with the other architectures disable stack protectors when compiling _start(). 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')
-rw-r--r--tools/include/nolibc/arch-s390.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/tools/include/nolibc/arch-s390.h b/tools/include/nolibc/arch-s390.h
index a738e7f3f8e8..516dff5bff8b 100644
--- a/tools/include/nolibc/arch-s390.h
+++ b/tools/include/nolibc/arch-s390.h
@@ -8,6 +8,8 @@
#include <asm/signal.h>
#include <asm/unistd.h>
+#include "compiler.h"
+
/* The struct returned by the stat() syscall, equivalent to stat64(). The
* syscall returns 116 bytes and stops in the middle of __unused.
*/
@@ -164,7 +166,7 @@ char **environ __attribute__((weak));
const unsigned long *_auxv __attribute__((weak));
/* startup code */
-void __attribute__((weak,noreturn,optimize("omit-frame-pointer"))) _start(void)
+void __attribute__((weak,noreturn,optimize("omit-frame-pointer"))) __no_stack_protector _start(void)
{
__asm__ volatile (
"lg %r2,0(%r15)\n" /* argument count */