]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
tools/nolibc: Rename __no_stack_protector to __nolibc_no_stack_protector
authorDaniel Palmer <daniel@thingy.jp>
Sat, 25 Apr 2026 11:13:14 +0000 (20:13 +0900)
committerThomas Weißschuh <linux@weissschuh.net>
Mon, 27 Apr 2026 16:14:47 +0000 (18:14 +0200)
To avoid polluting the namespace rename __no_stack_protector to
__nolibc_no_stack_protector so its now within the nolibc umbrella.

Suggested-by: Willy Tarreau <w@1wt.eu>
Signed-off-by: Daniel Palmer <daniel@thingy.jp>
Link: https://patch.msgid.link/20260425111315.3191461-2-daniel@thingy.jp
Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
13 files changed:
tools/include/nolibc/arch-arm.h
tools/include/nolibc/arch-arm64.h
tools/include/nolibc/arch-loongarch.h
tools/include/nolibc/arch-m68k.h
tools/include/nolibc/arch-mips.h
tools/include/nolibc/arch-powerpc.h
tools/include/nolibc/arch-riscv.h
tools/include/nolibc/arch-s390.h
tools/include/nolibc/arch-sh.h
tools/include/nolibc/arch-sparc.h
tools/include/nolibc/arch-x86.h
tools/include/nolibc/compiler.h
tools/include/nolibc/stackprotector.h

index a4d3a777a051bae42a0c9597e665b9423ca3c448..72a2b28170e28d29df88227cc60e1195a4c3e3da 100644 (file)
 
 #ifndef NOLIBC_NO_RUNTIME
 /* startup code */
-void __attribute__((weak, noreturn)) __nolibc_entrypoint __no_stack_protector _start(void)
+void __attribute__((weak, noreturn)) __nolibc_entrypoint __nolibc_no_stack_protector _start(void)
 {
        __asm__ volatile (
                "mov r0, sp\n"          /* save stack pointer to %r0, as arg1 of _start_c */
index 28b3c7536ad6d349f3bb99f3434761968cba9e24..814bcc13b4b22753facaef71d3df8460099ffd84 100644 (file)
 
 #ifndef NOLIBC_NO_RUNTIME
 /* startup code */
-void __attribute__((weak, noreturn)) __nolibc_entrypoint __no_stack_protector _start(void)
+void __attribute__((weak, noreturn)) __nolibc_entrypoint __nolibc_no_stack_protector _start(void)
 {
        __asm__ volatile (
                "mov x0, sp\n"          /* save stack pointer to x0, as arg1 of _start_c */
index 86fb34bbf1857ec360a09ceae467a830ffc3604b..3abed96a15e86e509810131d49a9b8e5d855a740 100644 (file)
 
 #ifndef NOLIBC_NO_RUNTIME
 /* startup code */
-void __attribute__((weak, noreturn)) __nolibc_entrypoint __no_stack_protector _start(void)
+void __attribute__((weak, noreturn)) __nolibc_entrypoint __nolibc_no_stack_protector _start(void)
 {
        __asm__ volatile (
                "move          $a0, $sp\n"         /* save stack pointer to $a0, as arg1 of _start_c */
index 81d34c219a42139c1a1c4a2fffa1ed7565a254d5..341f434a530c583b622de52a3fdb4f849b5b6a0c 100644 (file)
 
 #ifndef NOLIBC_NO_RUNTIME
 void _start(void);
-void __attribute__((weak, noreturn)) __nolibc_entrypoint __no_stack_protector _start(void)
+void __attribute__((weak, noreturn)) __nolibc_entrypoint __nolibc_no_stack_protector _start(void)
 {
        __asm__ volatile (
                "movel %sp, %sp@-\n"
index bb9d580ea1b16d64326c601ffb35ba06717fab27..2b7a0bd3fc30fe45504229ec980b778c59972d3b 100644 (file)
 #ifndef NOLIBC_NO_RUNTIME
 /* startup code, note that it's called __start on MIPS */
 void __start(void);
-void __attribute__((weak, noreturn)) __nolibc_entrypoint __no_stack_protector __start(void)
+void __attribute__((weak, noreturn)) __nolibc_entrypoint __nolibc_no_stack_protector __start(void)
 {
        __asm__ volatile (
                "move  $a0, $sp\n"       /* save stack pointer to $a0, as arg1 of _start_c */
index ef878868aa4ad565c494ce437dc463ca8159d339..111cda70f2cc6d895d1c558cda19cf3443d557be 100644 (file)
  * "omit-frame-pointer" fails with __attribute__((no_stack_protector)) but
  * works with __attribute__((__optimize__("-fno-stack-protector")))
  */
-#ifdef __no_stack_protector
-#undef __no_stack_protector
-#define __no_stack_protector __attribute__((__optimize__("-fno-stack-protector")))
+#ifdef __nolibc_no_stack_protector
+#undef __nolibc_no_stack_protector
+#define __nolibc_no_stack_protector __attribute__((__optimize__("-fno-stack-protector")))
 #endif
 #endif /* !__powerpc64__ */
 
 #ifndef NOLIBC_NO_RUNTIME
 /* startup code */
-void __attribute__((weak, noreturn)) __nolibc_entrypoint __no_stack_protector _start(void)
+void __attribute__((weak, noreturn)) __nolibc_entrypoint __nolibc_no_stack_protector _start(void)
 {
 #ifdef __powerpc64__
 #if _CALL_ELF == 2
index 386ebb9f5b087bd6bcc263ead961eec7c3e4549a..1e84ed2e63b3e70c4d328ff3934e00409b9711c4 100644 (file)
 
 #ifndef NOLIBC_NO_RUNTIME
 /* startup code */
-void __attribute__((weak, noreturn)) __nolibc_entrypoint __no_stack_protector _start(void)
+void __attribute__((weak, noreturn)) __nolibc_entrypoint __nolibc_no_stack_protector _start(void)
 {
        __asm__ volatile (
                ".option push\n"
index 4e69123ae484002a22af4223f375e495d9800ec7..3f05c01aecc6380e6523dbfd8370982253718713 100644 (file)
 
 #ifndef NOLIBC_NO_RUNTIME
 /* startup code */
-void __attribute__((weak, noreturn)) __nolibc_entrypoint __no_stack_protector _start(void)
+void __attribute__((weak, noreturn)) __nolibc_entrypoint __nolibc_no_stack_protector _start(void)
 {
        __asm__ volatile (
                "lgr    %r2, %r15\n"          /* save stack pointer to %r2, as arg1 of _start_c */
index b5a64ceeec97414cbc8106b97fac3e96c6e3911d..a32378fd621fda172ed0686c5688a2dafc9105a3 100644 (file)
 #ifndef NOLIBC_NO_RUNTIME
 /* startup code */
 void _start_wrapper(void);
-void __attribute__((weak,noreturn)) __nolibc_entrypoint __no_stack_protector _start_wrapper(void)
+void __attribute__((weak, noreturn)) __nolibc_entrypoint __nolibc_no_stack_protector _start_wrapper(void)
 {
        __asm__ volatile (
                ".global _start\n"           /* The C function will have a prologue,         */
index 240539d069a80793b899d90b16023335a023ef9f..ddae9bc10dfe38a329fd75a7e9f442e54bced352 100644 (file)
 
 #ifndef NOLIBC_NO_RUNTIME
 /* startup code */
-void __attribute__((weak, noreturn)) __nolibc_entrypoint __no_stack_protector _start(void)
+void __attribute__((weak, noreturn)) __nolibc_entrypoint __nolibc_no_stack_protector _start(void)
 {
        __asm__ volatile (
                /*
index 769ba01a8629ff4d7f2a3896617c7aabafecdec6..db5ccba772d086aa22aab7740d5cebf04f8e5e9f 100644 (file)
  * 2) The deepest stack frame should be set to zero
  *
  */
-void __attribute__((weak, noreturn)) __nolibc_entrypoint __no_stack_protector _start(void)
+void __attribute__((weak, noreturn)) __nolibc_entrypoint __nolibc_no_stack_protector _start(void)
 {
        __asm__ volatile (
                "xor  %ebp, %ebp\n"       /* zero the stack frame                                */
@@ -333,7 +333,7 @@ void __attribute__((weak, noreturn)) __nolibc_entrypoint __no_stack_protector _s
  * 2) The deepest stack frame should be zero (the %rbp).
  *
  */
-void __attribute__((weak, noreturn)) __nolibc_entrypoint __no_stack_protector _start(void)
+void __attribute__((weak, noreturn)) __nolibc_entrypoint __nolibc_no_stack_protector _start(void)
 {
        __asm__ volatile (
                "xor  %ebp, %ebp\n"       /* zero the stack frame                            */
index b56570bf9f69e191a5833483859473afa4118d3c..f2d7a81d0d7c6a9cdcaab7b58b1fd871b51ed1a4 100644 (file)
@@ -36,9 +36,9 @@
 #endif /* defined(__SSP__) ... */
 
 #if __nolibc_has_attribute(no_stack_protector)
-#  define __no_stack_protector __attribute__((no_stack_protector))
+#  define __nolibc_no_stack_protector __attribute__((no_stack_protector))
 #else
-#  define __no_stack_protector __attribute__((__optimize__("-fno-stack-protector")))
+#  define __nolibc_no_stack_protector __attribute__((__optimize__("-fno-stack-protector")))
 #endif /* __nolibc_has_attribute(no_stack_protector) */
 
 #if __nolibc_has_attribute(__fallthrough__)
index ae8b1d3a374dcdb20b48ad0d9379eb98d50c87b4..e11c20c75465496a32f96bb8d4cfb304eb9bbf39 100644 (file)
@@ -40,7 +40,7 @@ void __stack_chk_fail_local(void)
 __attribute__((weak,used,section(".data.nolibc_stack_chk")))
 uintptr_t __stack_chk_guard;
 
-static __no_stack_protector void __stack_chk_init(void)
+static __nolibc_no_stack_protector void __stack_chk_init(void)
 {
        __nolibc_syscall3(__NR_getrandom, &__stack_chk_guard, sizeof(__stack_chk_guard), 0);
        /* a bit more randomness in case getrandom() fails, ensure the guard is never 0 */