From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on gnuweeb.org X-Spam-Level: X-Spam-Status: No, score=-0.0 required=5.0 tests=SPF_HELO_PASS,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 Received: from 1wt.eu (wtarreau.pck.nerim.net [62.212.114.60]) by gnuweeb.org (Postfix) with ESMTP id 2DE547E2CF for ; Sun, 20 Mar 2022 19:16:32 +0000 (UTC) Received: (from willy@localhost) by pcw.home.local (8.15.2/8.15.2/Submit) id 22KJGJcQ027355; Sun, 20 Mar 2022 20:16:19 +0100 Date: Sun, 20 Mar 2022 20:16:19 +0100 From: Willy Tarreau To: Ammar Faizi Cc: "Paul E. McKenney" , Alviro Iskandar Setiawan , Nugraha , Linux Kernel Mailing List , GNU/Weeb Mailing List , llvm@lists.linux.dev Subject: Re: [RFC PATCH v1 2/6] tools/nolibc: Make the entry point not weak for clang Message-ID: <20220320191619.GA27312@1wt.eu> References: <20220320093750.159991-1-ammarfaizi2@gnuweeb.org> <20220320093750.159991-3-ammarfaizi2@gnuweeb.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220320093750.159991-3-ammarfaizi2@gnuweeb.org> User-Agent: Mutt/1.10.1 (2018-07-13) List-Id: Hi Ammar, I've had a look at this one. On Sun, Mar 20, 2022 at 04:37:46PM +0700, Ammar Faizi wrote: > Budilig with clang yields the following error: ^^^^^^^ BTW please fix the typo in the final commit message. > @@ -183,7 +183,9 @@ struct sys_stat_struct { > > /* startup code */ > asm(".section .text\n" > +#if !defined(__clang__) > ".weak _start\n" > +#endif > ".global _start\n" > "_start:\n" So it seems that I was wrong and that .weak is an alternate for .global and not a complement. As such, instead of adding all these #if, please simply remove all .global. Thanks! Willy