]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
modpost: fix section mismatch check for exported init/exit sections
authorMasahiro Yamada <masahiroy@kernel.org>
Fri, 10 Jun 2022 18:32:30 +0000 (03:32 +0900)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 2 Jul 2022 14:18:10 +0000 (16:18 +0200)
commitac0d234fe54bd895f3472e6221db72eb0a4b833d
tree52b22016aa018fd1afa36a325ad3d773d53acdaa
parent45bebbc8cea7d586a6216dc62814bdb380b9b29b
modpost: fix section mismatch check for exported init/exit sections

commit 28438794aba47a27e922857d27b31b74e8559143 upstream.

Since commit f02e8a6596b7 ("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: f02e8a6596b7 ("module: Sort exported symbols")
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Reviewed-by: Nick Desaulniers <ndesaulniers@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
scripts/mod/modpost.c