Skip to content

Commit 2843879

Browse files
committed
modpost: fix section mismatch check for exported init/exit sections
Since commit f02e8a6 ("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: f02e8a6 ("module: Sort exported symbols") Signed-off-by: Masahiro Yamada <[email protected]> Reviewed-by: Nick Desaulniers <[email protected]>
1 parent a111daf commit 2843879

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

scripts/mod/modpost.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -980,7 +980,7 @@ static const struct sectioncheck sectioncheck[] = {
980980
},
981981
/* Do not export init/exit functions or data */
982982
{
983-
.fromsec = { "__ksymtab*", NULL },
983+
.fromsec = { "___ksymtab*", NULL },
984984
.bad_tosec = { INIT_SECTIONS, EXIT_SECTIONS, NULL },
985985
.mismatch = EXPORT_TO_INIT_EXIT,
986986
.symbol_white_list = { DEFAULT_SYMBOL_WHITE_LIST, NULL },

0 commit comments

Comments
 (0)