Received: by 2002:a05:7412:d8a:b0:e2:908c:2ebd with SMTP id b10csp1129133rdg; Wed, 11 Oct 2023 15:48:41 -0700 (PDT) X-Google-Smtp-Source: AGHT+IH3fCVVEqOHRso2ipCexN2I21TtFKdIiZJUN7esXWfpaYdbkFarK1ttTzd6/SW5S5wnqrnK X-Received: by 2002:a05:6e02:2189:b0:34f:e4e1:b4aa with SMTP id j9-20020a056e02218900b0034fe4e1b4aamr26543519ila.14.1697064521405; Wed, 11 Oct 2023 15:48:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697064521; cv=none; d=google.com; s=arc-20160816; b=jxMRmARm2msFbp/zldzy0PPzNo85n1X6vJYJf3Eh/kfc0yNyPO8vuCt2avGQsvqSXJ QK9mqiN8m3oM6kJf55PTRnRTMKubU3/1KyECK+kuhq0GhAwmNfOV/ajVBCUdSH8DzL/h 3uuB8Y4oFDWxctx2rmV7zBCfaLq/VbeoRaTUpVrgnFcjQJGPMUuJGGy6PXW2MCzt4R56 gldNOjW3JtiG0lh3rmf/YNEuJuw1WGfld6XJyox3mwXxgdwOQYKAwcPj0IDfl24qkY2V uprckFMPvWUajU/t2uIKck4O1n+pMF5FNH//1Knmhq5BVZsPz0XneLyMNbZOnYfoOwTk mlJw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:message-id:content-transfer-encoding :mime-version:subject:date:from:dkim-signature; bh=040KSG4dy9KbR7qWxnPU5CD7civfNe9szjcTBnAN34E=; fh=xhGRs+C8L42Os8uqW15db/n1HHo2LdbASAFFt6X3l5M=; b=VDBqvsw+zjSeU5ty0swoi7JkcwkGvet3qHfmnvhpqYzkn6h3efbq2YTv3g6j9gcxNr yTSzsuF37rL7nyX0EPa5uu31yO6cWs+sSXF1e8GZpZAMYS9HXc7HB8GSP3RSUd70kOO/ BAhcVjix1FdyH8pCZ3uQeXl8yg/i4zpqcskoRDyYd25qkalxe9q6Vm5Kw2gb5RTipH0X fGkUnc9EoMrknp7KW37oT7VDl/wqB+m0SJFXFOHO0SUq4U6fDUrpsomQIbcjtYfuzkid oVKrnPOF579OvW5levr2Yck0xY7pFnjez/tGShKytcfJTgzSVs/phLlMb9OWCzLwI5TP boWA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@weissschuh.net header.s=mail header.b=cCkBlBza; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from fry.vger.email (fry.vger.email. [23.128.96.38]) by mx.google.com with ESMTPS id bt8-20020a632908000000b00578f1ab2287si713274pgb.354.2023.10.11.15.48.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Oct 2023 15:48:41 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) client-ip=23.128.96.38; Authentication-Results: mx.google.com; dkim=pass header.i=@weissschuh.net header.s=mail header.b=cCkBlBza; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by fry.vger.email (Postfix) with ESMTP id 53E1680A1E1C; Wed, 11 Oct 2023 15:48:38 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at fry.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235193AbjJKWsa (ORCPT + 99 others); Wed, 11 Oct 2023 18:48:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57002 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229884AbjJKWs3 (ORCPT ); Wed, 11 Oct 2023 18:48:29 -0400 Received: from todd.t-8ch.de (todd.t-8ch.de [IPv6:2a01:4f8:c010:41de::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9CD019D for ; Wed, 11 Oct 2023 15:48:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=weissschuh.net; s=mail; t=1697064505; bh=E+6v163CL8VkWi7Xk/2zA6K5NLTXD66hkQycZmPY0lE=; h=From:Date:Subject:To:Cc:From; b=cCkBlBzaJhVmad4Z2tpeArYeYnSUejsapZ78O86edfsNxYLFDRDP+cITKPnDviKHQ nieRjF/4ouad8IyTOtTHyv0z85mCjds3B+EOHczrd+cEjPQDjw99cRiVkchJEv9skj vDZKs/QghVFcfGQM14H1WaHzvb+dWsQtz2+g3Qo4= From: =?utf-8?q?Thomas_Wei=C3=9Fschuh?= Date: Thu, 12 Oct 2023 00:48:23 +0200 Subject: [PATCH] tools/nolibc: mark start_c as weak MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit Message-Id: <20231012-nolibc-start_c-multiple-v1-1-fbfc73e0283f@weissschuh.net> X-B4-Tracking: v=1; b=H4sIADYmJ2UC/x3M3wpAMBSA8VfRuXbKNvLnVSQxB6dmtI2UvLvl8 nfxfQ94ckwemuQBRxd73m2ESBPQ62AXQp6iQWZSiUxItLvhUaMPgwu9xu00gQ9DKKq5LvJJSSp ziPXhaOb7P7fd+37r1XXhaQAAAA== To: Willy Tarreau , Zhangjin Wu Cc: linux-kernel@vger.kernel.org, =?utf-8?q?Thomas_Wei=C3=9Fschuh?= X-Mailer: b4 0.12.3 X-Developer-Signature: v=1; a=ed25519-sha256; t=1697064504; l=1173; i=linux@weissschuh.net; s=20221212; h=from:subject:message-id; bh=E+6v163CL8VkWi7Xk/2zA6K5NLTXD66hkQycZmPY0lE=; b=r0xhlWCJP7TZXtAlMV4/HCfXVuQ8VXOSHGEgwiiLsOCgHrkF/fRYHPfLyVk+LoEog9SOtKTpb BMc+I+ad0YlCZ1RhhzX45E1q6b6kdB9zz96STVn8KP62aX4WxNme4M6 X-Developer-Key: i=linux@weissschuh.net; a=ed25519; pk=KcycQgFPX2wGR5azS7RhpBqedglOZVgRPfdFSPB1LNw= X-Spam-Status: No, score=2.7 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, RCVD_IN_SBL_CSS,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on fry.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 (fry.vger.email [0.0.0.0]); Wed, 11 Oct 2023 15:48:38 -0700 (PDT) X-Spam-Level: ** 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 --- 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 b84f5fbb7b58..43b551468c2a 100644 --- a/tools/include/nolibc/crt.h +++ b/tools/include/nolibc/crt.h @@ -22,6 +22,7 @@ extern void (*const __init_array_end[])(void) __attribute__((weak)); extern void (*const __fini_array_start[])(void) __attribute__((weak)); extern void (*const __fini_array_end[])(void) __attribute__((weak)); +__attribute__((weak)) void _start_c(long *sp) { long argc; --- base-commit: e76716696ba0c5c41667a11caa092cd619a79c5b change-id: 20231012-nolibc-start_c-multiple-18f954d32e74 Best regards, -- Thomas Weißschuh