From patchwork Sun May 21 16:04:06 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 13249433 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5586DC77B73 for ; Sun, 21 May 2023 16:05:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229985AbjEUQFS (ORCPT ); Sun, 21 May 2023 12:05:18 -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 ); 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 To: linux-kbuild@vger.kernel.org Cc: linux-kernel@vger.kernel.org, Nathan Chancellor , Nick Desaulniers , Nicolas Schier , Masahiro Yamada 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 Precedence: bulk List-ID: X-Mailing-List: linux-kbuild@vger.kernel.org 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 Reviewed-by: Nick Desaulniers --- 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; }