Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp25196922rwd; Sun, 2 Jul 2023 12:18:06 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ67TQH8GUeV3ICbzEwEYjg4cpEGfXYfWTNQ0zw2LM/osi7KCBODuxV0OmVtzcSjXiiEaJUz X-Received: by 2002:a05:6a20:320e:b0:11f:2714:f6f3 with SMTP id hl14-20020a056a20320e00b0011f2714f6f3mr5208481pzc.11.1688325486608; Sun, 02 Jul 2023 12:18:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1688325486; cv=none; d=google.com; s=arc-20160816; b=kBfBjaMqQlP0fy2WTvPvG+zedG8tdpH1+uYzeZZlCh6RRshCU8CxPwp7Yme9tJ7gdi JwgC7HMXnjI2VqFha2urkX6+OFQTcgqgxvrn7KdP6QNCmdNa9vb57+VJB38M/pc/LFMF Zt/jzqHTVKeeRjVPccJp0EiMcMNdIP2Ir6T5+Y4+5VhTxj463ktocOED2i7SEXBelQCX UC3UUpYFAgos1CSORUjJmMmb5Fbj30XVbTBCvahQgLKdbpy9t45WfRtHwxImw0wHuWqz n6DD0jxWAtxOTBaVETKy7b25QtwXFmIec1BEsPCM7xaaPTak61qjJswTn6EKa1J4x9Jj 8pTg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:dkim-signature:date; bh=eTdTpf11wnUo6iLwtgIv0XlBhy5nkjWkDSjN9dQzoqs=; fh=rNujkmb2tU37nbKenQbBATsZR+5Oz8euKfPM4ZOLEqU=; b=ZeZogkn6KyeIfex/YQoz7VC220raeHyXCzXQjeCxpokr22h4hyYxmwhi0LqVEScreg WvO1oHKE9HQaBn99gNoOkcVN01vGPlf9EbjFJI+5G3eAJ9iXTwjaMGu/P+i19/2pDcPj 5l817A8DMfphAJEBigeWeUpHaI6WWJt23CX5bg5h58U5n5zsBX4fPmUIkTMzCB9YQEwk 4ru3dSLCXtA3tvvJzAgLk5cSKZlBasa2+GenUSvsQJxBuiqfyTKg9921jSN63X0RNgoq lLwlsF5Oj9TXpmxd/Rr1UJJWs5Tir0cKuXebC2moeyjUENY0N15oUrC+/MAIbfpLFymB dztA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@t-8ch.de header.s=mail header.b=I4wmFcsE; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id c5-20020a6566c5000000b0055b07fcb6easi11406112pgw.401.2023.07.02.12.17.51; Sun, 02 Jul 2023 12:18:06 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@t-8ch.de header.s=mail header.b=I4wmFcsE; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229707AbjGBS5r (ORCPT + 99 others); Sun, 2 Jul 2023 14:57:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38954 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230026AbjGBS5o (ORCPT ); Sun, 2 Jul 2023 14:57:44 -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 52AAFE5B; Sun, 2 Jul 2023 11:57:16 -0700 (PDT) Date: Sun, 2 Jul 2023 20:57:09 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=t-8ch.de; s=mail; t=1688324230; bh=67ILj3chIboW2gmsBz04V0Mib+VgnjMHIAk/zViRZ/s=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=I4wmFcsE48BwNsSf/NiYdrV2MaT8cgcaO8c1oFIG9IFyjeQvnkNvSB3BFW6Eszhte e8k9qEe8ohCQcD7VshlVt7ULvk7BOT3Cf3/BZMVcIMX8bkU9ULaLkLPcLUGJhas/pQ fG68qTYRXpNDXQe8ka2YkquxZxqTDRlGvbLWswV8= From: Thomas =?utf-8?Q?Wei=C3=9Fschuh?= To: Zhangjin Wu Cc: w@1wt.eu, arnd@arndb.de, linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org, linux-riscv@lists.infradead.org Subject: Re: [PATCH v1 03/11] tools/nolibc: include crt.h before arch.h Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2023-06-29 02:54:35+0800, Zhangjin Wu wrote: > The crt.h provides a new _start_c() function, which is required by the > new assembly _start entry of arch-.h (included by arch.h), let's > include crt.h before arch.h. > > This '#include "crt.h"' doesn't let the new _start_c() work immediately, > but it is a base of the coming patches to move most of the assembly > _start operations to the _start_c() function for every supported > architecture. Why don't the arch-*.h files include this new header? They are the users of the new symbol. > > Signed-off-by: Zhangjin Wu > --- > tools/include/nolibc/Makefile | 1 + > tools/include/nolibc/nolibc.h | 1 + > tools/include/nolibc/signal.h | 1 + > tools/include/nolibc/stdio.h | 1 + > tools/include/nolibc/stdlib.h | 1 + > tools/include/nolibc/sys.h | 1 + > tools/include/nolibc/time.h | 1 + > tools/include/nolibc/unistd.h | 1 + > 8 files changed, 8 insertions(+) > > diff --git a/tools/include/nolibc/Makefile b/tools/include/nolibc/Makefile > index 875e13e3c851..00471e59b11e 100644 > --- a/tools/include/nolibc/Makefile > +++ b/tools/include/nolibc/Makefile > @@ -37,6 +37,7 @@ NARCH = $(or $(NARCH_$(ARCH)),$(ARCH)) > arch_file := arch-$(NARCH).h > all_files := \ > compiler.h \ > + crt.h \ This should be part of the patch adding the file. > ctype.h \ > errno.h \ > nolibc.h \ > diff --git a/tools/include/nolibc/nolibc.h b/tools/include/nolibc/nolibc.h > index 1f8d821000ac..2cc9ccd90d56 100644 > --- a/tools/include/nolibc/nolibc.h > +++ b/tools/include/nolibc/nolibc.h > @@ -93,6 +93,7 @@ > #define _NOLIBC_H > > #include "std.h" > +#include "crt.h" > #include "arch.h" > #include "types.h" > #include "sys.h" > diff --git a/tools/include/nolibc/signal.h b/tools/include/nolibc/signal.h > index 137552216e46..f0a1418c1cb2 100644 > --- a/tools/include/nolibc/signal.h > +++ b/tools/include/nolibc/signal.h > @@ -8,6 +8,7 @@ > #define _NOLIBC_SIGNAL_H > > #include "std.h" > +#include "crt.h" > #include "arch.h" > #include "types.h" > #include "sys.h" > diff --git a/tools/include/nolibc/stdio.h b/tools/include/nolibc/stdio.h > index 0eef91daf289..89d3749b3620 100644 > --- a/tools/include/nolibc/stdio.h > +++ b/tools/include/nolibc/stdio.h > @@ -10,6 +10,7 @@ > #include > > #include "std.h" > +#include "crt.h" > #include "arch.h" > #include "errno.h" > #include "types.h" > diff --git a/tools/include/nolibc/stdlib.h b/tools/include/nolibc/stdlib.h > index 902162f80337..0ff7fac40bd4 100644 > --- a/tools/include/nolibc/stdlib.h > +++ b/tools/include/nolibc/stdlib.h > @@ -8,6 +8,7 @@ > #define _NOLIBC_STDLIB_H > > #include "std.h" > +#include "crt.h" > #include "arch.h" > #include "types.h" > #include "sys.h" > diff --git a/tools/include/nolibc/sys.h b/tools/include/nolibc/sys.h > index 2c302f3feb71..b6c33c40c037 100644 > --- a/tools/include/nolibc/sys.h > +++ b/tools/include/nolibc/sys.h > @@ -24,6 +24,7 @@ > #include /* for LINUX_REBOOT_* */ > #include > > +#include "crt.h" > #include "arch.h" > #include "errno.h" > #include "types.h" > diff --git a/tools/include/nolibc/time.h b/tools/include/nolibc/time.h > index 84655361b9ad..bbe8f9aa3e9b 100644 > --- a/tools/include/nolibc/time.h > +++ b/tools/include/nolibc/time.h > @@ -8,6 +8,7 @@ > #define _NOLIBC_TIME_H > > #include "std.h" > +#include "crt.h" > #include "arch.h" > #include "types.h" > #include "sys.h" > diff --git a/tools/include/nolibc/unistd.h b/tools/include/nolibc/unistd.h > index e38f3660c051..f1677224bb5a 100644 > --- a/tools/include/nolibc/unistd.h > +++ b/tools/include/nolibc/unistd.h > @@ -8,6 +8,7 @@ > #define _NOLIBC_UNISTD_H > > #include "std.h" > +#include "crt.h" > #include "arch.h" > #include "types.h" > #include "sys.h" > -- > 2.25.1 >