diff options
author | Thomas Weißschuh <linux@weissschuh.net> | 2024-08-07 23:51:41 +0200 |
---|---|---|
committer | Thomas Weißschuh <linux@weissschuh.net> | 2024-08-12 22:21:00 +0200 |
commit | ef32e9b6a325d1d013b30d898b4dff94082902cd (patch) | |
tree | 723e5d6540621566c030ecc89312460c5909d456 /tools/include/nolibc/arch-s390.h | |
parent | tools/nolibc: compiler: introduce __nolibc_has_attribute() (diff) | |
download | linux-ef32e9b6a325d1d013b30d898b4dff94082902cd.tar.xz linux-ef32e9b6a325d1d013b30d898b4dff94082902cd.zip |
tools/nolibc: move entrypoint specifics to compiler.h
The specific attributes for the _start entrypoint are duplicated for
each architecture.
Deduplicate it into a dedicated #define into compiler.h.
For clang compatibility, the epilogue will also need to be adapted, so
move that one, too.
Acked-by: Willy Tarreau <w@1wt.eu>
Link: https://lore.kernel.org/r/20240807-nolibc-llvm-v2-5-c20f2f5fc7c2@weissschuh.net
Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
Diffstat (limited to 'tools/include/nolibc/arch-s390.h')
-rw-r--r-- | tools/include/nolibc/arch-s390.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/include/nolibc/arch-s390.h b/tools/include/nolibc/arch-s390.h index 5d60fd43f883..2ec13d8b9a2d 100644 --- a/tools/include/nolibc/arch-s390.h +++ b/tools/include/nolibc/arch-s390.h @@ -139,7 +139,7 @@ }) /* startup code */ -void __attribute__((weak, noreturn, optimize("Os", "omit-frame-pointer"))) __no_stack_protector _start(void) +void __attribute__((weak, noreturn)) __nolibc_entrypoint __no_stack_protector _start(void) { __asm__ volatile ( "lgr %r2, %r15\n" /* save stack pointer to %r2, as arg1 of _start_c */ @@ -147,7 +147,7 @@ void __attribute__((weak, noreturn, optimize("Os", "omit-frame-pointer"))) __no_ "xc 0(8,%r15), 0(%r15)\n" /* clear backchain */ "brasl %r14, _start_c\n" /* transfer to c runtime */ ); - __builtin_unreachable(); + __nolibc_entrypoint_epilogue(); } struct s390_mmap_arg_struct { |