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=-17.7 required=5.0 tests=DKIMWL_WL_MED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,ENV_AND_HDR_SPF_MATCH, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS, USER_IN_DEF_DKIM_WL,USER_IN_DEF_SPF_WL autolearn=ham autolearn_force=no version=3.4.6 Received: from mail-lf1-f41.google.com (mail-lf1-f41.google.com [209.85.167.41]) by gnuweeb.org (Postfix) with ESMTPS id CDE2D7E2DC for ; Mon, 21 Mar 2022 17:27:16 +0000 (UTC) Authentication-Results: gnuweeb.org; dkim=pass (2048-bit key; unprotected) header.d=google.com header.i=@google.com header.a=rsa-sha256 header.s=20210112 header.b=aVvx3FDf; dkim-atps=neutral Received: by mail-lf1-f41.google.com with SMTP id w27so25746459lfa.5 for ; Mon, 21 Mar 2022 10:27:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=gjlWSgDYCbI3M0HlDfM+vRBeQFnG0r9FgmdbuPnrgqQ=; b=aVvx3FDfpN2WfwpjlyxpAb5Fwswxlfi/0LDhMZdxBX1bJ4kqbt7F9JwUIf4M2YGi+A +Wnc0mnQTa5PhVU9lA/PnyGKLEnXuH89p3UwUuSoj5zvNzipTCWhi8oYbyzjlZ+P7/bf WHY1ioGhcshdkuE1zdzW3HsrHW2LidtQE0aXvGDbh9W0ZBivvNYFkFRbyEaLU1p/PkrR YqnjBZe9cWSaE1WsqyzmpquwIAyvR0Y5piDM1O9Gs37X6CSORvAEy7NhCpZsbLwgAXl1 a9vy260QEtWazFypwCq7q+O33a7nkhm4ra1V5zP6OaPHpRUvrjGs7Xj0WY6U0JMggzFP kVVA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=gjlWSgDYCbI3M0HlDfM+vRBeQFnG0r9FgmdbuPnrgqQ=; b=Yh66Y6CTd7KyXzgnsDJMUL5YW7Nytm2xvIEJbt97i+5Th91bBeAwyT2/ga/VIt3dA+ XesfeSxYKcmjJwVL/MHEoLlL1WiK1EKhcuAFQe0J5yn7wdNE4XIO/XEfE/KwqO1N32xC rJ7/HZYcMK0Ps86NXRaotiF2egTojaqe/jcK1ClW+TY5ZdZVCSruP2xt9COb/Kpff6BC imrF4HSwt4ejE7oPfSETxlqUZLI3gXQofZ4eIw7wPb0ZAgkLLh1tEzvc+XhbdMSLllGa tKDnas+HJ2ahL5VjsSagRPGluEDYBuoepur7BTRbZRAm9/znF+Tlhz0QhmGxvGGbij+P 9DDg== X-Gm-Message-State: AOAM531Z+0YcwuNecEZrpS4klJJKjEK3OBk6VIcCoFIv8M9Bw2E5gStB 4G+E8nYrzsRwnsV9T2N/sD8QTMuCZXXzeaNzt9gdbg== X-Google-Smtp-Source: ABdhPJy4rZuO7vtP7+8b/Mnd+Mllf2Xr2hwf83Dz2QNhS8sDUM8I/x5BFB4QCsYPBIVI5J7rSfIgJWZP/6BJmllE6vs= X-Received: by 2002:a05:6512:3341:b0:433:b033:bd22 with SMTP id y1-20020a056512334100b00433b033bd22mr15309077lfd.190.1647883634694; Mon, 21 Mar 2022 10:27:14 -0700 (PDT) MIME-Version: 1.0 References: <20220320093750.159991-1-ammarfaizi2@gnuweeb.org> <20220320093750.159991-3-ammarfaizi2@gnuweeb.org> <20220320191619.GA27312@1wt.eu> <9e69af8e-74c1-f35b-98dd-e2a77153ea09@gnuweeb.org> In-Reply-To: <9e69af8e-74c1-f35b-98dd-e2a77153ea09@gnuweeb.org> From: Nick Desaulniers Date: Mon, 21 Mar 2022 10:27:03 -0700 Message-ID: Subject: Re: [RFC PATCH v1 2/6] tools/nolibc: Make the entry point not weak for clang To: Ammar Faizi Cc: Willy Tarreau , "Paul E. McKenney" , Alviro Iskandar Setiawan , Nugraha , Linux Kernel Mailing List , "GNU/Weeb Mailing List" , llvm@lists.linux.dev Content-Type: text/plain; charset="UTF-8" List-Id: On Mon, Mar 21, 2022 at 4:38 AM Ammar Faizi wrote: > > On 3/21/22 2:16 AM, Willy Tarreau wrote: > > 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. See also: commit 4d6ffa27b8e5 ("x86/lib: Change .weak to SYM_FUNC_START_WEAK for arch/x86/lib/mem*_64.S") commit ec9d78070de9 ("arm64: Change .weak to SYM_FUNC_START_WEAK_PI for arch/arm64/lib/mem*.S") Also, please note in the commit message that this diagnostic comes from using clang as the assembler (which is clang's default behavior unless -fno-integrated-as is passed). > > Will fix this in the next version. > > -- > Ammar Faizi > -- Thanks, ~Nick Desaulniers