Received: by 2002:a05:7412:251c:b0:e2:908c:2ebd with SMTP id w28csp797246rda; Sun, 22 Oct 2023 10:06:50 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFQp5MhwE+blvgOyuouQiNn3P4ZBXvlqOQnHWAol87qu1NRDzbvZCIxQxx3O5X69dNvJ5Bl X-Received: by 2002:a05:6602:3425:b0:7a6:7bbe:5a9b with SMTP id n37-20020a056602342500b007a67bbe5a9bmr11685595ioz.3.1697994410514; Sun, 22 Oct 2023 10:06:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697994410; cv=none; d=google.com; s=arc-20160816; b=RYpCAXkUB+qyGjD/eI+i172zw10700twL9HzmABGG83b8GCz5y2pBrB4wvcWha+rAu /3tyCRl9farerzRzW+hwkzydaXJDpp/F8DRmcPPFppmsGK4QWTmgVH+9SkhxpUlrLlM4 38h2IQvqJ+hAPVqrAw+GHT6bzjNI+w8EFmX1HRO00W8/2E1LNvTe18H8z5jMH7PcC9ke +4On+qvp+hmkHTD5tb1nMQHgKz89SkDzWLxZxS80W8mVV/8AYY8xOdxaFrhE9MCvds9q LPO5+UDWFmf0gAyiV3kPyZDSN3yn/4P5NgNYYRHjz1JnUZBmxx0GlA9SmYZKLpI0KabU XR0A== 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=Yi1Z4LXxgKybmfUy0iZy+H2SJfkbMM4PJ7330g2D4wI=; fh=wKrPioF+0wPaktGqmf0aQvlk8PY4Pc32rTAsBSAiP8I=; b=tt1/3mewXeFyDIVqsRteEoWzITV7TskLdqF6T2pxKqKKkbXyCnNAFlMff+Xz4Y2Rd1 ZCck0X+y/4CWOUdgq4s2V4kpzF7RBZi6IQw+9OdBXDqyEKVIeDaYqFh1nL6sPCM8z8/S FFsZCkG4elcCkqwFNf3w4du7EC1QoHC8JYGRTooUMaCkUFY9W47bnUKw4D/OnbON1yeb +asN+24ZyPslkOlUKECmVQS7mcxV6PTi4sL/57VsrSoJSivTcA0n6bNp68bsGmtVANtw AAiV4ALJqCEbnHF+pL1DARH7UDI6AF6aZU9F6Flmxy7Zt0SwmsJU7bkp4+K02IWcjap6 G68A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="MTY/zbtu"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 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 snail.vger.email (snail.vger.email. [23.128.96.37]) by mx.google.com with ESMTPS id z24-20020a656658000000b005740b4723f9si5348835pgv.811.2023.10.22.10.06.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 22 Oct 2023 10:06:50 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) client-ip=23.128.96.37; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="MTY/zbtu"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 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 (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id A980680A777E; Sun, 22 Oct 2023 10:06:42 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232573AbjJVRGf (ORCPT + 99 others); Sun, 22 Oct 2023 13:06:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53114 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232443AbjJVRG1 (ORCPT ); Sun, 22 Oct 2023 13:06:27 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7E205119; Sun, 22 Oct 2023 10:06:25 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1AE55C433BB; Sun, 22 Oct 2023 17:06:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1697994385; bh=JGaUnTUZE4/t01Gqe9nbznjUqklvDlxx4Gf2S+Ki0Ko=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=MTY/zbtuzdasxDR9cQ0LmqDv4FTLNY6HGgn4Qym261RFNer3DIcCMu2+SQzeJs717 KWBYy/Pc9bVNrOExQBVDa4r00WPBK2ZAotcvwSu2Z/QsbmNXADt4OZsQYxCaPntqNw GaFXuRIvcf5mmZkUXNCayIVzNxKdfuHga8qzf+XccbVoK1ebJUCa0M2af0zYRlqR7Z uVhCguL/iJL2T4n9f8v77c91IfGDob5oz46yRFDu5O+ych2/GjUpreMUQxZUGJehSs tJ1Avsz3VEMgMHwjSaRVZRVwBuBPcgk2dnepot1fmndkw0BRqEpQeXffvzGI34Hygt RNMYcKRUU2qiA== From: Masahiro Yamada To: linux-kbuild@vger.kernel.org Cc: linux-kernel@vger.kernel.org, Masahiro Yamada , Nathan Chancellor , Nick Desaulniers , Nicolas Schier Subject: [PATCH 06/10] modpost: remove EXIT_SECTIONS macro Date: Mon, 23 Oct 2023 02:06:09 +0900 Message-Id: <20231022170613.2072838-6-masahiroy@kernel.org> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20231022170613.2072838-1-masahiroy@kernel.org> References: <20231022170613.2072838-1-masahiroy@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS 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 X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Sun, 22 Oct 2023 10:06:42 -0700 (PDT) ALL_EXIT_SECTIONS and EXIT_SECTIONS are the same. Remove the latter. Signed-off-by: Masahiro Yamada --- scripts/mod/modpost.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/scripts/mod/modpost.c b/scripts/mod/modpost.c index 626ab599eea2..f73835b8f1f9 100644 --- a/scripts/mod/modpost.c +++ b/scripts/mod/modpost.c @@ -808,7 +808,7 @@ static void check_section(const char *modname, struct elf_info *elf, #define ALL_XXXINIT_SECTIONS ".meminit.*" #define ALL_INIT_SECTIONS INIT_SECTIONS, ALL_XXXINIT_SECTIONS -#define ALL_EXIT_SECTIONS EXIT_SECTIONS +#define ALL_EXIT_SECTIONS ".exit.*" #define DATA_SECTIONS ".data", ".data.rel" #define TEXT_SECTIONS ".text", ".text.*", ".sched.text", \ @@ -819,8 +819,6 @@ static void check_section(const char *modname, struct elf_info *elf, #define INIT_SECTIONS ".init.*" -#define EXIT_SECTIONS ".exit.*" - #define ALL_TEXT_SECTIONS ALL_INIT_TEXT_SECTIONS, ALL_EXIT_TEXT_SECTIONS, \ TEXT_SECTIONS, OTHER_TEXT_SECTIONS @@ -1006,7 +1004,7 @@ static int secref_whitelist(const char *fromsec, const char *fromsym, */ if (!extra_warn && match(fromsec, PATTERNS(DATA_SECTIONS)) && - match(tosec, PATTERNS(EXIT_SECTIONS)) && + match(tosec, PATTERNS(ALL_EXIT_SECTIONS)) && match(fromsym, PATTERNS("*driver"))) return 0; @@ -1169,7 +1167,7 @@ static void check_export_symbol(struct module *mod, struct elf_info *elf, if (match(secname, PATTERNS(INIT_SECTIONS))) warn("%s: %s: EXPORT_SYMBOL used for init symbol. Remove __init or EXPORT_SYMBOL.\n", mod->name, name); - else if (match(secname, PATTERNS(EXIT_SECTIONS))) + else if (match(secname, PATTERNS(ALL_EXIT_SECTIONS))) warn("%s: %s: EXPORT_SYMBOL used for exit symbol. Remove __exit or EXPORT_SYMBOL.\n", mod->name, name); } -- 2.40.1