summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorMasahiro Yamada <masahiroy@kernel.org>2020-06-01 14:57:13 +0900
committerMasahiro Yamada <masahiroy@kernel.org>2020-06-06 23:38:12 +0900
commit7e8a3235823bcb779acf92de630edd5ddffaf886 (patch)
tree5c070389dfde04dff4c84a4bf80af1f1214d1029 /scripts
parent436b2ac603d58504f38041a0cd8adb5aeace992b (diff)
downloadlinux-7e8a3235823bcb779acf92de630edd5ddffaf886.tar.bz2
modpost: show warning if vmlinux is not found when processing modules
check_exports() does not print warnings about unresolved symbols if vmlinux is missing because there would be too many. This situation happens when you do 'make modules' from the clean tree, or compile external modules against a kernel tree that has not been completely built. It is dangerous to not check unresolved symbols because you might be building useless modules. At least it should be warned. Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Diffstat (limited to 'scripts')
-rw-r--r--scripts/mod/modpost.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/scripts/mod/modpost.c b/scripts/mod/modpost.c
index b839c48689df..3df26789c2e6 100644
--- a/scripts/mod/modpost.c
+++ b/scripts/mod/modpost.c
@@ -2001,8 +2001,6 @@ static void read_symbols(const char *modname)
mod = new_module(modname);
- /* When there's no vmlinux, don't print warnings about
- * unresolved symbols (since there'll be too many ;) */
if (is_vmlinux(modname)) {
have_vmlinux = 1;
mod->skip = 1;
@@ -2623,6 +2621,13 @@ int main(int argc, char **argv)
if (files_source)
read_symbols_from_files(files_source);
+ /*
+ * When there's no vmlinux, don't print warnings about
+ * unresolved symbols (since there'll be too many ;)
+ */
+ if (!have_vmlinux)
+ warn("Symbol info of vmlinux is missing. Unresolved symbol check will be entirely skipped.\n");
+
err = 0;
for (mod = modules; mod; mod = mod->next) {