All of lore.kernel.org
 help / color / mirror / Atom feed
From: Masahiro Yamada <masahiroy@kernel.org>
To: linux-kbuild@vger.kernel.org
Cc: linux-kernel@vger.kernel.org,
	Masahiro Yamada <masahiroy@kernel.org>,
	Nathan Chancellor <nathan@kernel.org>,
	Nick Desaulniers <ndesaulniers@google.com>,
	Nicolas Schier <nicolas@fjasle.eu>
Subject: [PATCH 06/10] modpost: remove EXIT_SECTIONS macro
Date: Mon, 23 Oct 2023 02:06:09 +0900	[thread overview]
Message-ID: <20231022170613.2072838-6-masahiroy@kernel.org> (raw)
In-Reply-To: <20231022170613.2072838-1-masahiroy@kernel.org>

ALL_EXIT_SECTIONS and EXIT_SECTIONS are the same. Remove the latter.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
---

 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


  parent reply	other threads:[~2023-10-22 17:06 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-22 17:06 [PATCH 01/10] modpost: remove ALL_EXIT_DATA_SECTIONS macro Masahiro Yamada
2023-10-22 17:06 ` [PATCH 02/10] linux/init: remove __memexit* annotations Masahiro Yamada
2023-10-22 18:24   ` Arnd Bergmann
2023-10-22 17:06 ` [PATCH 03/10] modpost: disallow *driver to reference .meminit* sections Masahiro Yamada
2023-10-22 17:06 ` [PATCH 04/10] modpost: remove more symbol patterns from the section check whitelist Masahiro Yamada
2023-10-23 23:28   ` Nathan Chancellor
2023-10-28 11:56     ` Masahiro Yamada
2023-10-22 17:06 ` [PATCH 05/10] modpost: remove MEM_INIT_SECTIONS macro Masahiro Yamada
2023-10-22 17:06 ` Masahiro Yamada [this message]
2023-10-22 17:06 ` [PATCH 07/10] modpost: disallow the combination of EXPORT_SYMBOL and __meminit* Masahiro Yamada
2023-10-22 17:06 ` [PATCH 08/10] modpost: use ALL_INIT_SECTIONS for the section check from DATA_SECTIONS Masahiro Yamada
2023-10-22 17:06 ` [PATCH 09/10] modpost: merge sectioncheck table entries regarding init/exit sections Masahiro Yamada
2023-10-22 17:06 ` [PATCH 10/10] modpost: squash ALL_{INIT,EXIT}_TEXT_SECTIONS to ALL_TEXT_SECTIONS Masahiro Yamada

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20231022170613.2072838-6-masahiroy@kernel.org \
    --to=masahiroy@kernel.org \
    --cc=linux-kbuild@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nathan@kernel.org \
    --cc=ndesaulniers@google.com \
    --cc=nicolas@fjasle.eu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.