From nobody Fri Jun 19 13:07:23 2026 Received: from mail-pj1-f50.google.com (mail-pj1-f50.google.com [209.85.216.50]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id AA1EF30BF52 for ; Sat, 25 Apr 2026 11:13:21 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.216.50 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1777115603; cv=none; b=aa6eC9oO7TirUiMo4/QMbJ7sjo3sqswLBCPqAtvRelCzLHi3XCRe/YMk0Rvbii7wZjZfbhoT+joXvSU0pMez2/t6cu9AsN9kw4EJasSpw/TpeQY8FhSkqk9pKUoT8OLra1oNb64OMrQ6JY4I1a4RiMUM2xtyCVkU5Rt1GIQPLis= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1777115603; c=relaxed/simple; bh=9DlgSc4f2ZgXXSEaDbpxfRAMxmK+kKsEivBp/L+jniM=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=LOYqa8BjmmiAUndRbW77v6yWnY1v+X2Vd2wPDUeASX8ndZueMTC4C7iepx3ztOM3quBd4YiQ34NzjczZnFZ5I8dFSJmJ5GaPEikAoV9cyeFD+Uckpv1+jLOYPgIQFSQSi3WeIu5PrtD9I5ncknBqvAosfdB3I03zXfDWmrzMRB0= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=thingy.jp; spf=pass smtp.mailfrom=0x0f.com; dkim=pass (1024-bit key) header.d=thingy.jp header.i=@thingy.jp header.b=eUCDe7Uc; arc=none smtp.client-ip=209.85.216.50 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=thingy.jp Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=0x0f.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=thingy.jp header.i=@thingy.jp header.b="eUCDe7Uc" Received: by mail-pj1-f50.google.com with SMTP id 98e67ed59e1d1-36146ae9dd4so7124178a91.3 for ; Sat, 25 Apr 2026 04:13:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=thingy.jp; s=google; t=1777115601; x=1777720401; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=YPKz+JOPIQRa7nL551/0pQHXUHsvMKqQ0yW+tYEzwiM=; b=eUCDe7UcBf2s0YKpwKI0KmmDK4wK5fkrvGyLK3dC32YCx+4hZhUYIxtUuVHheN0Et9 yCC7See4EUjpHKC9uEWPm8WVRDKkzx/xelvhYVZbuGKN8RtTxskhChO9+pymKzHnldO1 KD/i7Ar0lGxo6eSC8j5FxeGmLDYaJDOLstjMg= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1777115601; x=1777720401; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=YPKz+JOPIQRa7nL551/0pQHXUHsvMKqQ0yW+tYEzwiM=; b=gAJdFe/gSE8vnsMSbXAyIKYC2lhDHwC0KorpdjwZrQO8YhiB1gpQFPt2SNcs09JO/B pI4/LG6ShgoJkxentMpZLGDUYjMPi1Yq4DeGlAqDHH/M5yZuC0B1L5sllsjmG7f2SXeI NapHW47xDuNSbmrYcpJRCYIjkn6gPnWLXoIoCRG5mze8kfLIqoMTE/If2ddcTqrA+M9+ RpO5mnXYYlnInuy7ETXNzTwPJEc6yStTa6bUO3iKZgymM6pQnWpCSAeN6hOVM1YVt4Ny tVT2qPaljanNmCOzqZ/VQG4v69/IqNiuctdF5+aRkmq15UUqwoD+A6XsuWtWr/hgFX1w NN/Q== X-Gm-Message-State: AOJu0Yw28gVBhOArrLcK0BSuxXxuynDQVW6c8l7AhLDlc+Gc9xN+JmVt Um43Bo3Ur/wjE9YcSfBfKmT2g3DcofVo0K3YIXmX30ofPqIAHW9bk8x1uDAsBDmfYHc= X-Gm-Gg: AeBDiev0jjwEqfGimtg3r8hcK/NYZhUNOI9wfNWhj70VBHdOr8uX9Qxby7ODy+kEJXn a1SudkAS9ZQfdRgQqsfGmE2XCiyc9587xeuGuL8uYxbWFrQcI2RrPoCB7GGFB0eop86t+YFALwW OphSznBoLTPFCKQrU3n7OtRKGo20KrK9C1MbSWBJ1j3uE401bKGVj1brebwFCJ0Vjn+Aa/gLYfD bMh5CDhooxXISo8R8WuMHCs5FNqsFTpniQpORBxPmVKQKJ0U8KEYu5QJU7pvKEDPduJ6kCncxnQ ds9jUzu4xJYEi8sIS8rBAOz7yZbkPnuOusjQs53YfDMedLrsVEr8gBx03cSBMtVrkuT41CfLy89 rMarNOTkHQYsXZOtpt2m3N81HrREpCy6S4m1GHGYh6sRYu+MVDW6wCgtqMrc2I6jEslf7hCDopQ 1lVt/OAVyyLp0rQwheO3xMvRVabOpICIT4BBn3f/fBibbAq/YgzH+n2qzlaSQCdJ/4kUlqBV1Zw 7m2Pkk/POFQXjksK9g0hSOIzeVFc/nShiQ= X-Received: by 2002:a17:90a:ec87:b0:359:f43d:4a6e with SMTP id 98e67ed59e1d1-361402171e3mr37198034a91.0.1777115601152; Sat, 25 Apr 2026 04:13:21 -0700 (PDT) Received: from kinako.work.home.arpa (p1329195-ipxg00a01sizuokaden.shizuoka.ocn.ne.jp. [114.145.5.195]) by smtp.googlemail.com with ESMTPSA id 98e67ed59e1d1-361417748aesm25424487a91.0.2026.04.25.04.13.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 25 Apr 2026 04:13:20 -0700 (PDT) From: Daniel Palmer To: w@1wt.eu, linux@weissschuh.net Cc: linux-kernel@vger.kernel.org, Daniel Palmer Subject: [PATCH 1/2] tools/nolibc: Rename __no_stack_protector to __nolibc_no_stack_protector Date: Sat, 25 Apr 2026 20:13:14 +0900 Message-ID: <20260425111315.3191461-2-daniel@thingy.jp> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260425111315.3191461-1-daniel@thingy.jp> References: <20260425111315.3191461-1-daniel@thingy.jp> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" 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 Signed-off-by: Daniel Palmer --- tools/include/nolibc/arch-arm.h | 2 +- tools/include/nolibc/arch-arm64.h | 2 +- tools/include/nolibc/arch-loongarch.h | 2 +- tools/include/nolibc/arch-m68k.h | 2 +- tools/include/nolibc/arch-mips.h | 2 +- tools/include/nolibc/arch-powerpc.h | 8 ++++---- tools/include/nolibc/arch-riscv.h | 2 +- tools/include/nolibc/arch-s390.h | 2 +- tools/include/nolibc/arch-sh.h | 2 +- tools/include/nolibc/arch-sparc.h | 2 +- tools/include/nolibc/arch-x86.h | 4 ++-- tools/include/nolibc/compiler.h | 4 ++-- tools/include/nolibc/stackprotector.h | 2 +- 13 files changed, 18 insertions(+), 18 deletions(-) diff --git a/tools/include/nolibc/arch-arm.h b/tools/include/nolibc/arch-ar= m.h index a4d3a777a051..72a2b28170e2 100644 --- a/tools/include/nolibc/arch-arm.h +++ b/tools/include/nolibc/arch-arm.h @@ -186,7 +186,7 @@ =20 #ifndef NOLIBC_NO_RUNTIME /* startup code */ -void __attribute__((weak, noreturn)) __nolibc_entrypoint __no_stack_protec= tor _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 */ diff --git a/tools/include/nolibc/arch-arm64.h b/tools/include/nolibc/arch-= arm64.h index 28b3c7536ad6..814bcc13b4b2 100644 --- a/tools/include/nolibc/arch-arm64.h +++ b/tools/include/nolibc/arch-arm64.h @@ -143,7 +143,7 @@ =20 #ifndef NOLIBC_NO_RUNTIME /* startup code */ -void __attribute__((weak, noreturn)) __nolibc_entrypoint __no_stack_protec= tor _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= */ diff --git a/tools/include/nolibc/arch-loongarch.h b/tools/include/nolibc/a= rch-loongarch.h index 86fb34bbf185..3abed96a15e8 100644 --- a/tools/include/nolibc/arch-loongarch.h +++ b/tools/include/nolibc/arch-loongarch.h @@ -144,7 +144,7 @@ =20 #ifndef NOLIBC_NO_RUNTIME /* startup code */ -void __attribute__((weak, noreturn)) __nolibc_entrypoint __no_stack_protec= tor _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 */ diff --git a/tools/include/nolibc/arch-m68k.h b/tools/include/nolibc/arch-m= 68k.h index 81d34c219a42..341f434a530c 100644 --- a/tools/include/nolibc/arch-m68k.h +++ b/tools/include/nolibc/arch-m68k.h @@ -130,7 +130,7 @@ =20 #ifndef NOLIBC_NO_RUNTIME void _start(void); -void __attribute__((weak, noreturn)) __nolibc_entrypoint __no_stack_protec= tor _start(void) +void __attribute__((weak, noreturn)) __nolibc_entrypoint __nolibc_no_stack= _protector _start(void) { __asm__ volatile ( "movel %sp, %sp@-\n" diff --git a/tools/include/nolibc/arch-mips.h b/tools/include/nolibc/arch-m= ips.h index bb9d580ea1b1..2b7a0bd3fc30 100644 --- a/tools/include/nolibc/arch-mips.h +++ b/tools/include/nolibc/arch-mips.h @@ -257,7 +257,7 @@ #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_protec= tor __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 */ diff --git a/tools/include/nolibc/arch-powerpc.h b/tools/include/nolibc/arc= h-powerpc.h index ef878868aa4a..111cda70f2cc 100644 --- a/tools/include/nolibc/arch-powerpc.h +++ b/tools/include/nolibc/arch-powerpc.h @@ -177,15 +177,15 @@ * "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-prote= ctor"))) +#ifdef __nolibc_no_stack_protector +#undef __nolibc_no_stack_protector +#define __nolibc_no_stack_protector __attribute__((__optimize__("-fno-stac= k-protector"))) #endif #endif /* !__powerpc64__ */ =20 #ifndef NOLIBC_NO_RUNTIME /* startup code */ -void __attribute__((weak, noreturn)) __nolibc_entrypoint __no_stack_protec= tor _start(void) +void __attribute__((weak, noreturn)) __nolibc_entrypoint __nolibc_no_stack= _protector _start(void) { #ifdef __powerpc64__ #if _CALL_ELF =3D=3D 2 diff --git a/tools/include/nolibc/arch-riscv.h b/tools/include/nolibc/arch-= riscv.h index 386ebb9f5b08..1e84ed2e63b3 100644 --- a/tools/include/nolibc/arch-riscv.h +++ b/tools/include/nolibc/arch-riscv.h @@ -141,7 +141,7 @@ =20 #ifndef NOLIBC_NO_RUNTIME /* startup code */ -void __attribute__((weak, noreturn)) __nolibc_entrypoint __no_stack_protec= tor _start(void) +void __attribute__((weak, noreturn)) __nolibc_entrypoint __nolibc_no_stack= _protector _start(void) { __asm__ volatile ( ".option push\n" diff --git a/tools/include/nolibc/arch-s390.h b/tools/include/nolibc/arch-s= 390.h index 4e69123ae484..3f05c01aecc6 100644 --- a/tools/include/nolibc/arch-s390.h +++ b/tools/include/nolibc/arch-s390.h @@ -145,7 +145,7 @@ =20 #ifndef NOLIBC_NO_RUNTIME /* startup code */ -void __attribute__((weak, noreturn)) __nolibc_entrypoint __no_stack_protec= tor _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 _sta= rt_c */ diff --git a/tools/include/nolibc/arch-sh.h b/tools/include/nolibc/arch-sh.h index b5a64ceeec97..a32378fd621f 100644 --- a/tools/include/nolibc/arch-sh.h +++ b/tools/include/nolibc/arch-sh.h @@ -143,7 +143,7 @@ #ifndef NOLIBC_NO_RUNTIME /* startup code */ void _start_wrapper(void); -void __attribute__((weak,noreturn)) __nolibc_entrypoint __no_stack_protect= or _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, = */ diff --git a/tools/include/nolibc/arch-sparc.h b/tools/include/nolibc/arch-= sparc.h index 240539d069a8..ddae9bc10dfe 100644 --- a/tools/include/nolibc/arch-sparc.h +++ b/tools/include/nolibc/arch-sparc.h @@ -154,7 +154,7 @@ =20 #ifndef NOLIBC_NO_RUNTIME /* startup code */ -void __attribute__((weak, noreturn)) __nolibc_entrypoint __no_stack_protec= tor _start(void) +void __attribute__((weak, noreturn)) __nolibc_entrypoint __nolibc_no_stack= _protector _start(void) { __asm__ volatile ( /* diff --git a/tools/include/nolibc/arch-x86.h b/tools/include/nolibc/arch-x8= 6.h index 769ba01a8629..db5ccba772d0 100644 --- a/tools/include/nolibc/arch-x86.h +++ b/tools/include/nolibc/arch-x86.h @@ -165,7 +165,7 @@ * 2) The deepest stack frame should be set to zero * */ -void __attribute__((weak, noreturn)) __nolibc_entrypoint __no_stack_protec= tor _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_entrypoin= t __no_stack_protector _s * 2) The deepest stack frame should be zero (the %rbp). * */ -void __attribute__((weak, noreturn)) __nolibc_entrypoint __no_stack_protec= tor _start(void) +void __attribute__((weak, noreturn)) __nolibc_entrypoint __nolibc_no_stack= _protector _start(void) { __asm__ volatile ( "xor %ebp, %ebp\n" /* zero the stack frame = */ diff --git a/tools/include/nolibc/compiler.h b/tools/include/nolibc/compile= r.h index b56570bf9f69..f2d7a81d0d7c 100644 --- a/tools/include/nolibc/compiler.h +++ b/tools/include/nolibc/compiler.h @@ -36,9 +36,9 @@ #endif /* defined(__SSP__) ... */ =20 #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-pro= tector"))) +# define __nolibc_no_stack_protector __attribute__((__optimize__("-fno-st= ack-protector"))) #endif /* __nolibc_has_attribute(no_stack_protector) */ =20 #if __nolibc_has_attribute(__fallthrough__) diff --git a/tools/include/nolibc/stackprotector.h b/tools/include/nolibc/s= tackprotector.h index ae8b1d3a374d..e11c20c75465 100644 --- a/tools/include/nolibc/stackprotector.h +++ b/tools/include/nolibc/stackprotector.h @@ -40,7 +40,7 @@ void __stack_chk_fail_local(void) __attribute__((weak,used,section(".data.nolibc_stack_chk"))) uintptr_t __stack_chk_guard; =20 -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 n= ever 0 */ --=20 2.53.0 From nobody Fri Jun 19 13:07:23 2026 Received: from mail-pg1-f174.google.com (mail-pg1-f174.google.com [209.85.215.174]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 570F235AC0B for ; Sat, 25 Apr 2026 11:13:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.215.174 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1777115604; cv=none; b=fS+F6UaiOCwmlXqu64oku4ijmUx33ckykJOOS17JslSg1eoENW+ycZmC9JXdvgH++pcIr3nugEZePNuqkvKip3cQ5UzRDXomvUnsLhcrt+/DI8oPSO/Colyo6lM4oX6HfWWlqB0cLyXCK9l67IiYn8ttOnzRVIANMMm+gG/JEJk= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1777115604; c=relaxed/simple; bh=a5r/urY9b5ru45gvlJU1C1fQxEQJac9l7d4rmfyVzP0=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=jMTVN2/xAPp4nHxShAjnDZiW4rEGlb0G0yBY29nMjnTt19yyDKJV3dxTi2fYOqSwcj2M1Z9TWcQH5+ogLOma0pRol4EAlEvl1zBm8tE4TxK0MMGWQYwIIrwmHwzS5p5IF99ryjlZExaQTHI5AbGOiG5k9lnntC4CyfdAqwfugLk= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=thingy.jp; spf=pass smtp.mailfrom=0x0f.com; dkim=pass (1024-bit key) header.d=thingy.jp header.i=@thingy.jp header.b=MQFzOYet; arc=none smtp.client-ip=209.85.215.174 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=thingy.jp Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=0x0f.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=thingy.jp header.i=@thingy.jp header.b="MQFzOYet" Received: by mail-pg1-f174.google.com with SMTP id 41be03b00d2f7-c70fb6aa323so3103499a12.3 for ; Sat, 25 Apr 2026 04:13:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=thingy.jp; s=google; t=1777115602; x=1777720402; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=JTLCItRj3JOmg5Bj2oOM6kzLOF9JN2sW51W3k0C36MQ=; b=MQFzOYetwCuhT0THlQvH8Txd4NcIwgu4t6rVLBlvMSQdmHIYb7fFzarlZDIpP3ZRpV 2yVaHfjhlqCKPo2NGc0FY6JYhdwoaEDc/qtCK/GUOpNIiACMCfp4XUeXFP5XChzBax5q Uga1+a44rr662FeYD1suuXqiHFF4W8x2jbTTE= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1777115602; x=1777720402; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=JTLCItRj3JOmg5Bj2oOM6kzLOF9JN2sW51W3k0C36MQ=; b=byuTyAzDhi5T1o/z4QAjV0jBWSnQoLG3xClq6gPbFYI4deJr+StW/+VvDelgARK/Lc 2K/Itg1hnkccB0iDDETJ+F+gPD3SisK2TQ23ip1I+sXYG1FMfS6f4NLqpCPVrYARmN9x T2xKUw+CMOGjrlXFHLhQgoavKg0DN/rlgtzIBn5X+8GWmRI4J9H9+dPAK+GOaaMeMXFM lInkc1prdIaLQ6HrgL9e89hQKjKwdkFL6smly/5pzJ+U3A762WfaBs4neAA5tn/6tfws YOlD8o0ZHcMUmzfUQbKzqqvxJrhoSVtnJsMNCD9gI4G17WX72MQlA000inuMbGS5Z0xD lBpg== X-Gm-Message-State: AOJu0YzgNshop5ly6/2jhgtHTJcKD7hQ2XOAFVWqpWK4P6hcrTIvhV7r WMhhkDhPts+zZCJfdo23LADXiCltYp0jr1V/hd0hTPS/rht4QG3IuLNgo4VWkr6kxNQ= X-Gm-Gg: AeBDietv5i3WW2/IzYCfhPpMWSveqmXVLKy3WNXfcLVMcf+pJU0JOTuZOvVCTXPDC/l cKusEF58fu0MSCVje3+1tpPKRYBn73egKNnahywjz+K7EMbu6BIJYDo4d/zvwZZPg8JVd0NDWl5 EiuuTzYdQf9MJKZndmnyh/QmdZCJjWCE55y1XqDtSaX/PnxPDEclCWijx8U437mZC8qo6jrIc6+ W8k+0r8qUx9J7v9xcKHpEzgze2jOuBfN/7UUH2UnBb0klrw6JX68wYQ414JjUK/gMQF0jwn2QKS qvL5V2tPVGeqIUTwL6+FJNbUngBwERrsc3AK/GUdtbKcVNWWzpxrsICd/NtbI1XuNyCxCSj07q9 7E+vFc6nepfnKFRIzgahT/8V9Rgly9DJvZ+X9UsmQv+CdwP9azU0QEPplZCTJpK3dntkz2EyJPl lwOGy6xDP/sicHj6JwCtcl8BKuMqQTX9kOlhJCqy3cz/IVjTNwP6/HahsNpdOPS1pPr+pA7XKOH CmNJXmf33UO0cKs+5akZrk0 X-Received: by 2002:a17:90b:1809:b0:359:15c8:e8e1 with SMTP id 98e67ed59e1d1-361404a8241mr36255084a91.25.1777115602530; Sat, 25 Apr 2026 04:13:22 -0700 (PDT) Received: from kinako.work.home.arpa (p1329195-ipxg00a01sizuokaden.shizuoka.ocn.ne.jp. [114.145.5.195]) by smtp.googlemail.com with ESMTPSA id 98e67ed59e1d1-361417748aesm25424487a91.0.2026.04.25.04.13.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 25 Apr 2026 04:13:22 -0700 (PDT) From: Daniel Palmer To: w@1wt.eu, linux@weissschuh.net Cc: linux-kernel@vger.kernel.org, Daniel Palmer Subject: [PATCH 2/2] tools/nolibc: Don't use stack protector before setting it up Date: Sat, 25 Apr 2026 20:13:15 +0900 Message-ID: <20260425111315.3191461-3-daniel@thingy.jp> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260425111315.3191461-1-daniel@thingy.jp> References: <20260425111315.3191461-1-daniel@thingy.jp> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" The stack protector is configured in _start_c() so we shouldn't use it before then. Add __nolibc_no_stack_protector to _start_c() to avoid the compiler generating stack protector code for _start_c() and thus using it before its configured. Signed-off-by: Daniel Palmer --- tools/include/nolibc/crt.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/include/nolibc/crt.h b/tools/include/nolibc/crt.h index d8ce91fd2e3b..0fe0a066d15a 100644 --- a/tools/include/nolibc/crt.h +++ b/tools/include/nolibc/crt.h @@ -47,7 +47,7 @@ char *__nolibc_program_invocation_short_name(char *long_n= ame) #endif /* NOLIBC_IGNORE_ERRNO */ =20 void _start_c(long *sp); -__attribute__((weak,used)) __nolibc_no_sanitize_undefined +__attribute__((weak, used)) __nolibc_no_sanitize_undefined __nolibc_no_sta= ck_protector void _start_c(long *sp) { long argc; --=20 2.53.0