Message ID | 20230521160426.1881124-2-masahiroy@kernel.org |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp948835vqo; Sun, 21 May 2023 09:06:13 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6SobVTZLQepEYtpaxA/+0AKsux+avKX1Rw3VyAMdgxYUs4ZPG2gUh4XXpxUSe8/Zih5qvF X-Received: by 2002:a17:90a:d78d:b0:253:38b7:682d with SMTP id z13-20020a17090ad78d00b0025338b7682dmr7902056pju.18.1684685172972; Sun, 21 May 2023 09:06:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684685172; cv=none; d=google.com; s=arc-20160816; b=K1VNJZnwHMY3BbFH4EPp9ThGUGlPlHT2L7pn2i5NLlzQEs7x7RH3Z9gIRufn/ogtLT qLMlvJC5mOHdeaRB2FXcty2l+JsFKa+G2Ymt2NoT62rVvgD/VlnWxRoNZNzHXRzwT3IJ gZbPlgX0tPf+hcWDs7pMAwojihII0/08o83cko9MlrGK58cOLGm2MYtSamTOKtu5iEAY so9FM222Ds6X1KTdLIiFp4rPMmf2gxW1H4NsDgmx3lJ0cS4+GvcWtNhLRG9HoyTOaBVN k2HkIPTnSeJZrJwVkCjiyWXPNEK1pCmYr26l5SoAPVrlHFOouLjWS2DIab77IKB4y/fO EKYg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=B+XxnwJmxxxmEvFQk5F5H9C3j5YjFObHBydDPiuZBwo=; b=i54pl6B+IMAC5lHQUzqrELlfpi7RDeRXI+i2tdKx44uQ5RXm0YjaAyzFTh9H+N+oHk TgHWryb0SgEV0p35pkw17d5VCYxptsmegeyPIx/y+SfuiS20uMSUH4Yz9sD0QjwHe++O YM3M2ukBoCHe4bFbLPE9eh5FsHEDBh/DO6CZBRNBxhmwdwiwb1cEejefx5qc3AHs3y3q hT0xle19hn9DvxqLRrAEwQxh4mF9mgzd1a6aehTyzRPv8/0ll9xzRH34cy2lnKs6D+ag xNVJOQgPHXdPI8UVZvigkcPmTaBjsiV/YHM+JeWiuyd+WkJPBlryklEJrJAcpHcLpDqF gcPw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=NEEQFwkI; 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: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id h1-20020a170902f54100b001a531f29044si3379939plf.521.2023.05.21.09.05.56; Sun, 21 May 2023 09:06:12 -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=NEEQFwkI; 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 S230134AbjEUQFV (ORCPT <rfc822;cscallsign@gmail.com> + 99 others); Sun, 21 May 2023 12:05:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55110 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229794AbjEUQFR (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Sun, 21 May 2023 12:05:17 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D9E11CD; Sun, 21 May 2023 09:05:16 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 6DA8660DE9; Sun, 21 May 2023 16:05:16 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id C2CA1C433EF; Sun, 21 May 2023 16:05:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1684685115; bh=kwJKTr748jqWjN1i3IcmeB/TjKVKVtw80rljWW81Xwc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=NEEQFwkIadEOXado3HB0SNTEaLqMIwaCppXoh+DRHhAGrRcWp8YS0ieITv9SInVxF 4tcnvGw/Q1GNj53MG1kvTnDeMbdi8YYBWt6/3R5Oq7p2gWyMkbbtcb+rIxxR+r80E4 pgbKJMap1F9PJY5eNNtdUXBU4upOAaC3vRumR2PWhTlSsXZlyCgrIo8tGAIxQOsod/ ovEaV8/07TpLL5WOVAx/gbfaWpZaI/NJI30tBs0PZBeYql7DNEOVT1MAHCdLzd1PlU mcG8McYtC3DY3BhAWL5x7+7Qvmyy1pIYeJYcpkntSwblGybyokRozk5WrEvTgoH9oq jomqSx445Gyhw== From: Masahiro Yamada <masahiroy@kernel.org> To: linux-kbuild@vger.kernel.org Cc: linux-kernel@vger.kernel.org, Nathan Chancellor <nathan@kernel.org>, Nick Desaulniers <ndesaulniers@google.com>, Nicolas Schier <nicolas@fjasle.eu>, Masahiro Yamada <masahiroy@kernel.org> Subject: [PATCH v6 01/20] Revert "modpost: skip ELF local symbols during section mismatch check" Date: Mon, 22 May 2023 01:04:06 +0900 Message-Id: <20230521160426.1881124-2-masahiroy@kernel.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230521160426.1881124-1-masahiroy@kernel.org> References: <20230521160426.1881124-1-masahiroy@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, 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: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1766520439795206701?= X-GMAIL-MSGID: =?utf-8?q?1766520439795206701?= |
Series |
Unify <linux/export.h> and <asm/export.h>, remove EXPORT_DATA_SYMBOL(), faster TRIM_UNUSED_KSYMS
|
|
Commit Message
Masahiro Yamada
May 21, 2023, 4:04 p.m. UTC
This reverts commit a4d26f1a0958bb1c2b60c6f1e67c6f5d43e2647b.
The variable 'fromsym' never starts with ".L" since commit 87e5b1e8f257
("module: Sync code of is_arm_mapping_symbol()").
In other words, Pattern 6 is now dead code.
Previously, the .LANCHOR1 hid the symbols listed in Pattern 2, but
a4d26f1a0958 was a cheesy workaround.
87e5b1e8f257 addressed the issue in a much better way.
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
---
scripts/mod/modpost.c | 12 ------------
1 file changed, 12 deletions(-)
Comments
On Sun, May 21, 2023 at 9:05 AM Masahiro Yamada <masahiroy@kernel.org> wrote: > > This reverts commit a4d26f1a0958bb1c2b60c6f1e67c6f5d43e2647b. a4d26f1a0958 mentions -fsection-anchors which I see used in: arch/arc/Makefile 41:cflags-y += -fsection-anchors Though based on the below, it looks like is_mapping_symbol() will catch this case. Reviewed-by: Nick Desaulniers <ndesaulniers@google.com> > > The variable 'fromsym' never starts with ".L" since commit 87e5b1e8f257 > ("module: Sync code of is_arm_mapping_symbol()"). > > In other words, Pattern 6 is now dead code. > > Previously, the .LANCHOR1 hid the symbols listed in Pattern 2, but > a4d26f1a0958 was a cheesy workaround. > > 87e5b1e8f257 addressed the issue in a much better way. is_arm_mapping_symbol is gone from scripts/mod/modpost.c. It was moved then renamed to is_mapping_symbol. Maybe not relevant for the commit message, but maybe helpful to other reviewers. commit 987d2e0aaa55 ("module: Move is_arm_mapping_symbol() to module_symbol.h") commit 0a3bf86092c3 ("module: Ignore L0 and rename is_arm_mapping_symbol()") > > Signed-off-by: Masahiro Yamada <masahiroy@kernel.org> > --- > > scripts/mod/modpost.c | 12 ------------ > 1 file changed, 12 deletions(-) > > diff --git a/scripts/mod/modpost.c b/scripts/mod/modpost.c > index 0d2c2aff2c03..71de14544432 100644 > --- a/scripts/mod/modpost.c > +++ b/scripts/mod/modpost.c > @@ -1034,14 +1034,6 @@ static const struct sectioncheck *section_mismatch( > * fromsec = text section > * refsymname = *.constprop.* > * > - * Pattern 6: > - * Hide section mismatch warnings for ELF local symbols. The goal > - * is to eliminate false positive modpost warnings caused by > - * compiler-generated ELF local symbol names such as ".LANCHOR1". > - * Autogenerated symbol names bypass modpost's "Pattern 2" > - * whitelisting, which relies on pattern-matching against symbol > - * names to work. (One situation where gcc can autogenerate ELF > - * local symbols is when "-fsection-anchors" is used.) > **/ > static int secref_whitelist(const struct sectioncheck *mismatch, > const char *fromsec, const char *fromsym, > @@ -1092,10 +1084,6 @@ static int secref_whitelist(const struct sectioncheck *mismatch, > match(fromsym, optim_symbols)) > return 0; > > - /* Check for pattern 6 */ > - if (strstarts(fromsym, ".L")) > - return 0; > - > return 1; > } > > -- > 2.39.2 >
diff --git a/scripts/mod/modpost.c b/scripts/mod/modpost.c index 0d2c2aff2c03..71de14544432 100644 --- a/scripts/mod/modpost.c +++ b/scripts/mod/modpost.c @@ -1034,14 +1034,6 @@ static const struct sectioncheck *section_mismatch( * fromsec = text section * refsymname = *.constprop.* * - * Pattern 6: - * Hide section mismatch warnings for ELF local symbols. The goal - * is to eliminate false positive modpost warnings caused by - * compiler-generated ELF local symbol names such as ".LANCHOR1". - * Autogenerated symbol names bypass modpost's "Pattern 2" - * whitelisting, which relies on pattern-matching against symbol - * names to work. (One situation where gcc can autogenerate ELF - * local symbols is when "-fsection-anchors" is used.) **/ static int secref_whitelist(const struct sectioncheck *mismatch, const char *fromsec, const char *fromsym, @@ -1092,10 +1084,6 @@ static int secref_whitelist(const struct sectioncheck *mismatch, match(fromsym, optim_symbols)) return 0; - /* Check for pattern 6 */ - if (strstarts(fromsym, ".L")) - return 0; - return 1; }