]> git.baikalelectronics.ru Git - kernel.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)
committerMasahiro Yamada <masahiroy@kernel.org>
Sun, 19 Jun 2022 23:18:03 +0000 (08:18 +0900)
commit0a8703aa4baf4f55a82f8f7c4b2688b91ba2a6f6
tree119c2a6d038c6bc7a1c7e2379871e43099d33e63
parent08aafa0d475a08e31a13403e9df41c7179f4bdcd
modpost: fix section mismatch check for exported init/exit sections

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