summaryrefslogtreecommitdiff
path: root/scripts/mod/modpost.c
diff options
context:
space:
mode:
authorMasahiro Yamada <masahiroy@kernel.org>2023-05-21 19:04:22 +0300
committerMasahiro Yamada <masahiroy@kernel.org>2023-05-28 14:39:52 +0300
commitabc23979ac90396c5a5dff03dcea198b5bd0c50d (patch)
tree238a04bc0e3ded5ab0319730a7d6b63ce6e90626 /scripts/mod/modpost.c
parentd4323e83505247d2aca1e2488f69da9aab8ad03f (diff)
downloadlinux-abc23979ac90396c5a5dff03dcea198b5bd0c50d.tar.xz
modpost: merge bad_tosec=ALL_EXIT_SECTIONS entries in sectioncheck table
There is no distinction between TEXT_TO_ANY_EXIT and DATA_TO_ANY_EXIT. Just merge them. Signed-off-by: Masahiro Yamada <masahiroy@kernel.org> Reviewed-by: Nick Desaulniers <ndesaulniers@google.com>
Diffstat (limited to 'scripts/mod/modpost.c')
-rw-r--r--scripts/mod/modpost.c15
1 files changed, 4 insertions, 11 deletions
diff --git a/scripts/mod/modpost.c b/scripts/mod/modpost.c
index 21417a4a7655..cc4cf40a360f 100644
--- a/scripts/mod/modpost.c
+++ b/scripts/mod/modpost.c
@@ -859,8 +859,7 @@ static const char *const optim_symbols[] = { "*.constprop.*", NULL };
enum mismatch {
TEXT_TO_ANY_INIT,
DATA_TO_ANY_INIT,
- TEXT_TO_ANY_EXIT,
- DATA_TO_ANY_EXIT,
+ TEXTDATA_TO_ANY_EXIT,
XXXINIT_TO_SOME_INIT,
XXXEXIT_TO_SOME_EXIT,
ANY_INIT_TO_ANY_EXIT,
@@ -904,14 +903,9 @@ static const struct sectioncheck sectioncheck[] = {
.mismatch = DATA_TO_ANY_INIT,
},
{
- .fromsec = { TEXT_SECTIONS, NULL },
- .bad_tosec = { ALL_EXIT_SECTIONS, NULL },
- .mismatch = TEXT_TO_ANY_EXIT,
-},
-{
- .fromsec = { DATA_SECTIONS, NULL },
+ .fromsec = { TEXT_SECTIONS, DATA_SECTIONS, NULL },
.bad_tosec = { ALL_EXIT_SECTIONS, NULL },
- .mismatch = DATA_TO_ANY_EXIT,
+ .mismatch = TEXTDATA_TO_ANY_EXIT,
},
/* Do not reference init code/data from meminit code/data */
{
@@ -1203,8 +1197,7 @@ static void default_mismatch_handler(const char *modname, struct elf_info *elf,
switch (mismatch->mismatch) {
case TEXT_TO_ANY_INIT:
case DATA_TO_ANY_INIT:
- case TEXT_TO_ANY_EXIT:
- case DATA_TO_ANY_EXIT:
+ case TEXTDATA_TO_ANY_EXIT:
case XXXINIT_TO_SOME_INIT:
case XXXEXIT_TO_SOME_EXIT:
case ANY_INIT_TO_ANY_EXIT: