Commit 79d8d4ca authored by Thomas Weißschuh's avatar Thomas Weißschuh Committed by Paul E. McKenney

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: default avatarThomas Weißschuh <linux@weissschuh.net>
Signed-off-by: default avatarWilly Tarreau <w@1wt.eu>
Signed-off-by: default avatarPaul E. McKenney <paulmck@kernel.org>
parent e76b70de
...@@ -8,6 +8,8 @@ ...@@ -8,6 +8,8 @@
#include <asm/signal.h> #include <asm/signal.h>
#include <asm/unistd.h> #include <asm/unistd.h>
#include "compiler.h"
/* The struct returned by the stat() syscall, equivalent to stat64(). The /* The struct returned by the stat() syscall, equivalent to stat64(). The
* syscall returns 116 bytes and stops in the middle of __unused. * syscall returns 116 bytes and stops in the middle of __unused.
*/ */
...@@ -164,7 +166,7 @@ char **environ __attribute__((weak)); ...@@ -164,7 +166,7 @@ char **environ __attribute__((weak));
const unsigned long *_auxv __attribute__((weak)); const unsigned long *_auxv __attribute__((weak));
/* startup code */ /* 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 ( __asm__ volatile (
"lg %r2,0(%r15)\n" /* argument count */ "lg %r2,0(%r15)\n" /* argument count */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment