Received: by 2002:a05:6358:7058:b0:131:369:b2a3 with SMTP id 24csp10782416rwp; Fri, 21 Jul 2023 05:04:51 -0700 (PDT) X-Google-Smtp-Source: APBJJlFrvNWmHLLNwWRxic8D5uU3KkCW2f05P7unFGs90IcqTMqrZlWxXYAikZvZqImLu15ekdds X-Received: by 2002:a05:6402:b14:b0:51d:8aaf:5adc with SMTP id bm20-20020a0564020b1400b0051d8aaf5adcmr1442926edb.14.1689941091357; Fri, 21 Jul 2023 05:04:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689941091; cv=none; d=google.com; s=arc-20160816; b=QxAJgEuFUcjsNNC65f4PIPiZwPpfT4Zr0wL3Shys0SYfldQNZGDHjuaDWByVlfgZFe PzJIkZ09Hi6pI7tM2Wzxd7dxEq1iR0RZ19Xo52hy9iCXxCzP5LAowCoQQX0kzqRHjtWz 2YAwor3UonItm8Ip+QNgzvPbyEVDTdVhG689z+MBfnCC8ZjwZHDEKvSlXU6Rr34sU0NL Pei0UjOE98srTHy5il+y+7axv77r9ojuS/sfClZ5OMpuXFy5YKIxULY/SYxjPVw2/Dl+ 3jYlxzNbER4OVW2q5ePZwSen2pTau1Bu8RUI5GElcyNkIFdk17Qs9a50CwB0JQiZ2E5f y/NQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=26LwVR/DelL31CsyGSTbL3AURmggO4Ke6E9JjmxwaxA=; fh=Xuiio5kQbCwhpHZkmfbzqeR7fkp5t0LEU6LldV3mAlQ=; b=GUUJk9BUmzcADT6ocNFmtHZbbyH1ewT0kKXdmsjCxEFjhKa23G5GZKWxHQhtvAYCGM kOcSiZhYcsGippZD2WEdGWua+7dm8orh+kSN8Zw/sPNkaoJQdHMhWR+rryN2mCGdX1yH ju5v5mjVyWQTlhJd+UJMAvNkh5k2WLWVtr2NVPF5ZB102N/GwTJCMbGwAdNqfLNN+Eh1 UGO0sxYt1oDHJDyezvOh/qfHNs0jtsoBh612VWWZoKvX5Of7jfihwwV3XGFh9nFNTpf1 t27MCcN+Gt+lehD15m+fHl64AMNy2tkJ4AroVGZf8Qq38a9g3rpJcbzeZELHZRgJILuH r3lg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=f0Vk7T6s; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id l18-20020aa7c3d2000000b0051dd1d7fbeasi2142600edr.683.2023.07.21.05.04.14; Fri, 21 Jul 2023 05:04:51 -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=@kernel.org header.s=k20201202 header.b=f0Vk7T6s; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230200AbjGUL7D (ORCPT + 99 others); Fri, 21 Jul 2023 07:59:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51716 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229890AbjGUL7B (ORCPT ); Fri, 21 Jul 2023 07:59:01 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 46B1E19B2; Fri, 21 Jul 2023 04:58:59 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id BFDEE61A73; Fri, 21 Jul 2023 11:58:58 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id E0CB3C433CB; Fri, 21 Jul 2023 11:58:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1689940737; bh=CMwTGHPOFWDu+r1fKACWnaAjI/cA9gmdXSJR7pRs1MM=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=f0Vk7T6sBjEX+cw4/0vYaVt70LOjpLARDiFaic0LzUvWVmcEi7eBbfENn2asSxWsW +STjvn1vZa3M7PPECSAKvXa2xQIAFlyLWPGUh2Y/qbemXtEs0gsS9tsfOratcNvEBQ 4Q9vzHCwLp/DvrP4KJZusCEgAWkUM5U/TYJoECFyQx/RItnslRySfwjjEbjVrwDdYa LSjZ7SVg1535QUQ/BRE/LUdeC+im+5Sh6wulPEs8wJrK8vKvhvve5s8mhPbyAoKVVo CcjD/WRQ+B95aTEdTo1pQOfJN8XY7EXc+Gs8ETWYLJ6goVjBonRAJAYp9J2wltsp7m czwD8aTHQGbFQ== Received: by mail-oo1-f48.google.com with SMTP id 006d021491bc7-5658573b1faso1160367eaf.1; Fri, 21 Jul 2023 04:58:57 -0700 (PDT) X-Gm-Message-State: ABy/qLbyuuFTwzFDb5TH8EOuRlDMfBe62mSQL5qujUr8y2sZMuUuu2QF pTgfz4fpot75K80Cos5qLUYvFmYBaFdPM3fbB38= X-Received: by 2002:a4a:6f46:0:b0:566:f3f1:5f5c with SMTP id i6-20020a4a6f46000000b00566f3f15f5cmr1281074oof.9.1689940737193; Fri, 21 Jul 2023 04:58:57 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Masahiro Yamada Date: Fri, 21 Jul 2023 20:58:20 +0900 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH -next] modpost: move some defines to the file head To: Palmer Dabbelt Cc: wangkefeng.wang@huawei.com, mcgrof@kernel.org, nathan@kernel.org, ndesaulniers@google.com, nicolas@fjasle.eu, linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, 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 Thu, Jul 13, 2023 at 1:28=E2=80=AFAM Palmer Dabbelt wrote: > > On Wed, 12 Jul 2023 08:55:23 PDT (-0700), masahiroy@kernel.org wrote: > > +To: Luis Chamberlain, the commiter of the breakage > > > > > > > > On Wed, Jul 12, 2023 at 10:44=E2=80=AFAM Kefeng Wang wrote: > >> > >> with "module: Ignore RISC-V mapping symbols too", build error occurs, > >> > >> scripts/mod/modpost.c: In function =E2=80=98is_valid_name=E2=80=99: > >> scripts/mod/modpost.c:1055:57: error: =E2=80=98EM_RISCV=E2=80=99 undec= lared (first use in this function) > >> return !is_mapping_symbol(name, elf->hdr->e_machine =3D=3D EM_RISCV)= ; > >> > >> Fix it by moving the EM_RISCV to the file head, also some other > >> defines in case of similar problem in the future. > > > > > > > > BTW, why is the flag 'is_riscv' needed? > > > > > > All symbols starting with '$' look special to me. > > > > > > > > Why not like this? > > > > > > if (str[0] =3D=3D '$') > > return true; > > > > return false; > > There's a bit of commentary in the v1 > = , > but essentially it's not necessary. I just wanted to play things safe > and avoid changing the mapping symbol detection elsewhere in order to > deal with RISC-V. > > IIRC we decided $ was special in RISC-V because there were some other > ports that behaved that way, but it wasn't universal. If folks are OK > treating $-prefixed symbols as special everywhere that's fine with me, I > just wasn't sure what the right answer was. > > There's also some similar arch-specific-ness with the labels and such in > here. Hi Palmer, I am not a toolchain expert, but my gut feeling is that the code was safer than needed. I'd like to remove the 'is_riscv' switch rather than applying this patch. Will you send a patch, or do you want me to do so? -- Best Regards Masahiro Yamada