Received: by 2002:a05:7412:d8a:b0:e2:908c:2ebd with SMTP id b10csp527080rdg; Thu, 12 Oct 2023 12:33:03 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHlaP/+TJFy8VPIDY4SsYDtBIMWlci3AGhxdmbatQzgOHu+wP/UCyr732eRUetpTS2LkWrS X-Received: by 2002:a05:6e02:f45:b0:357:478f:a744 with SMTP id y5-20020a056e020f4500b00357478fa744mr6793741ilj.10.1697139183715; Thu, 12 Oct 2023 12:33:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697139183; cv=none; d=google.com; s=arc-20160816; b=bhPSYPHnPeMQtQWLjsMhxdIfZ/nbSX+XL5t7viXJRYzQmNLbxfqzHUDblZOdu+kKcj oGN8Um9BnpyGMoQ9YB1OwP5f0PJFxIE6TBcCfh8Rh3icmPZwI/kZlK1HAsqidx0kJF2y iJcrzqaPLYHBjOv6uDhXj1iku2kEbNUxOPKsXpV9qIJ3BYTOuIPHlE6BkAFAIFKt5Mn3 GxQTi8Z5Bx5b66Q5R76QfobSCkdnDOkRrY2qhUPTXQTO5dDlLBpuitjA6SnabzM++zyt EZJH0fO2X/OdT6ZAJRiemVHpYO1f8ywrW/Dlzb7nCZ31hiTrFmo18R7tQ3lk0m+o1Lrb C5sQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=rsh6Ik3Fv4ulVlzdFckdmZ/OSPHiajaZeIhGEHLa6XY=; fh=n5S/AR14tYMsjDdXEOPrR3UbxswSa5eTzDqlfcgbnjE=; b=z4a5sdqTv5N+J0yhuzsbV9I5GIGf4gn7eg68OyH/nqIGNHzOB7rk4e8fWfOBWdrvYo 8/Dopw0Y+UEeua1/1vgk+sey4u7C936y0NMBa2OaopU+z8haPtOTKUMxtfuleXBcVOPp WA7KqtYb3C3Wm8DgsbTyCOgoaQPigq22NZRjERcs5TH3JMSFl6QV7ui60s3mYb8VzGCx XFQsxup0aRffppsW1rDPbZYxMiZlh5eak0cJUXO0LBdyKDOpnbMQgPASU659GAgCUHfE NpU9WPG2P8NoulGE9V33/7HYWq0QmTisoKZU4CgR8V9z/kt+sd+kO1A9hofo3LL30T79 I1lA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=NZm8UEOl; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from morse.vger.email (morse.vger.email. [2620:137:e000::3:1]) by mx.google.com with ESMTPS id cz4-20020aa79304000000b0068fea05ecd7si14504541pfb.164.2023.10.12.12.33.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 12 Oct 2023 12:33:03 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 as permitted sender) client-ip=2620:137:e000::3:1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=NZm8UEOl; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by morse.vger.email (Postfix) with ESMTP id 05DC383FC386; Thu, 12 Oct 2023 12:32:56 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at morse.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1442355AbjJLTcm (ORCPT + 99 others); Thu, 12 Oct 2023 15:32:42 -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: 8bit X-Spam-Status: No, score=-1.2 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on morse.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (morse.vger.email [0.0.0.0]); Thu, 12 Oct 2023 12:32:56 -0700 (PDT) From: Thomas Weißschuh 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ßschuh Link: https://lore.kernel.org/lkml/20231012-nolibc-start_c-multiple-v1-1-fbfc73e0283f@weissschuh.net/ Link: https://lore.kernel.org/lkml/20231012-nolibc-linkage-test-v1-1-315e682768b4@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); +__attribute__((weak)) void _start_c(long *sp) { long argc; -- 2.40.1