Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9a13d7ef authored by Masahiro Yamada's avatar Masahiro Yamada Committed by Greg Kroah-Hartman
Browse files

modpost: fix section mismatch check for exported init/exit sections



commit 28438794aba47a27e922857d27b31b74e8559143 upstream.

Since commit f02e8a65 ("module: Sort exported symbols"),
EXPORT_SYMBOL* is placed in the individual section ___ksymtab(_gpl)+<sym>
(3 leading underscores instead of 2).

Since then, modpost cannot detect the bad combination of EXPORT_SYMBOL
and __init/__exit.

Fix the .fromsec field.

Fixes: f02e8a65 ("module: Sort exported symbols")
Signed-off-by: default avatarMasahiro Yamada <masahiroy@kernel.org>
Reviewed-by: default avatarNick Desaulniers <ndesaulniers@google.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 68d4303b
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1066,7 +1066,7 @@ static const struct sectioncheck sectioncheck[] = {
},
/* Do not export init/exit functions or data */
{
	.fromsec = { "__ksymtab*", NULL },
	.fromsec = { "___ksymtab*", NULL },
	.bad_tosec = { INIT_SECTIONS, EXIT_SECTIONS, NULL },
	.mismatch = EXPORT_TO_INIT_EXIT,
	.symbol_white_list = { DEFAULT_SYMBOL_WHITE_LIST, NULL },