Skip to content

Commit 7e8a323

Browse files
committed
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>
1 parent 436b2ac commit 7e8a323

1 file changed

Lines changed: 7 additions & 2 deletions

File tree

‎scripts/mod/modpost.c‎

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2001,8 +2001,6 @@ static void read_symbols(const char *modname)
20012001

20022002
mod = new_module(modname);
20032003

2004-
/* When there's no vmlinux, don't print warnings about
2005-
* unresolved symbols (since there'll be too many ;) */
20062004
if (is_vmlinux(modname)) {
20072005
have_vmlinux = 1;
20082006
mod->skip = 1;
@@ -2623,6 +2621,13 @@ int main(int argc, char **argv)
26232621
if (files_source)
26242622
read_symbols_from_files(files_source);
26252623

2624+
/*
2625+
* When there's no vmlinux, don't print warnings about
2626+
* unresolved symbols (since there'll be too many ;)
2627+
*/
2628+
if (!have_vmlinux)
2629+
warn("Symbol info of vmlinux is missing. Unresolved symbol check will be entirely skipped.\n");
2630+
26262631
err = 0;
26272632

26282633
for (mod = modules; mod; mod = mod->next) {

0 commit comments

Comments
 (0)