From nobody Thu Dec 18 00:45:44 2025 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7FAE5CDB482 for ; Thu, 12 Oct 2023 19:32:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1442367AbjJLTcn (ORCPT ); Thu, 12 Oct 2023 15:32:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52628 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1442158AbjJLTci (ORCPT ); Thu, 12 Oct 2023 15:32:38 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 24D2EE6 for ; Thu, 12 Oct 2023 12:32:36 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id AF8CBC433CA; Thu, 12 Oct 2023 19:32:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1697139155; bh=pg4Aqoba2EU/o3cS7KiwqgLXSRgn8eg2p5Eiz67tpcs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=NZm8UEOl+44DEWZ0QLu7dr6fraJOnu4psSm2sgUqRVrF5C+k9wKoP4R6cCTPWnOev NJAgGMoxg4qD0CrBd1LRiNtUvJAHKdHJ44C93nz0Rz6/59N+U5D8YCbTqPfSAT8c5s g1sqZDPfrBTU1Cuos5QjUTJlrA+wy/wKjLacLafZ0NAkP9fi0SxO4Nk4XHacy8/xms 3SBYVUOT/7TqfgGOlTD1Fe/jHBeeYW53NHkJ7KrxWNxz8buzd5NwC5PS8WvcB/djhT Zm6oS/udqDCXjzsawYqKSOnaSYzZTEeuO2On49ROTEh3IoExqdfNZOX4aczNLC4yQl 80zh0AazHi4UQ== Received: by paulmck-ThinkPad-P17-Gen-1.home (Postfix, from userid 1000) id 42B17CE09E3; Thu, 12 Oct 2023 12:32:35 -0700 (PDT) From: "Paul E. McKenney" To: linux-kernel@vger.kernel.org Cc: gwml@vger.gnuweeb.org, kernel-team@meta.com, w@lwt.eu, =?UTF-8?q?Thomas=20Wei=C3=9Fschuh?= , Willy Tarreau Subject: [PATCH nolibc 03/19] tools/nolibc: mark start_c as weak Date: Thu, 12 Oct 2023 12:32:17 -0700 Message-Id: <20231012193233.207857-3-paulmck@kernel.org> X-Mailer: git-send-email 2.40.1 In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Thomas Wei=C3=9Fschuh Otherwise the different instances of _start_c from each compilation unit will lead to linker errors: /usr/bin/ld: /tmp/ccSNvRqs.o: in function `_start_c': nolibc-test-foo.c:(.text.nolibc_memset+0x9): multiple definition of `_start= _c'; /tmp/ccG25101.o:nolibc-test.c:(.text+0x1ea3): first defined here Fixes: 17336755150b ("tools/nolibc: add new crt.h with _start_c") Signed-off-by: Thomas Wei=C3=9Fschuh Link: https://lore.kernel.org/lkml/20231012-nolibc-start_c-multiple-v1-1-fb= fc73e0283f@weissschuh.net/ Link: https://lore.kernel.org/lkml/20231012-nolibc-linkage-test-v1-1-315e68= 2768b4@weissschuh.net/ Acked-by: Willy Tarreau --- tools/include/nolibc/crt.h | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/include/nolibc/crt.h b/tools/include/nolibc/crt.h index a5f33fef1672..a05655b4ce1d 100644 --- a/tools/include/nolibc/crt.h +++ b/tools/include/nolibc/crt.h @@ -13,6 +13,7 @@ const unsigned long *_auxv __attribute__((weak)); static void __stack_chk_init(void); static void exit(int); =20 +__attribute__((weak)) void _start_c(long *sp) { long argc; --=20 2.40.1