History

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.

Masahiro Yamada committed 6 years ago

Commit 7e8a3231 parent 436b2ac1 file · +7 −2Browse files

Showing the changes to scripts (1 of 1 file). Show all

Unified · Split

scripts/mod/modpost.c+7−2
@@ -2001,8 +2001,6 @@ static void read_symbols(const char *modname) · 2000 unmodified lines
2001 2001
2002 mod = new_module(modname);2002 mod = new_module(modname);
2003 2003
2004 /* When there's no vmlinux, don't print warnings about
2005 * unresolved symbols (since there'll be too many ;) */
2006 if (is_vmlinux(modname)) {2004 if (is_vmlinux(modname)) {
2007 have_vmlinux = 1;2005 have_vmlinux = 1;
2008 mod->skip = 1;2006 mod->skip = 1;
@@ -2623,6 +2621,13 @@ int main(int argc, char **argv) · 614 unmodified lines
2623 if (files_source)2621 if (files_source)
2624 read_symbols_from_files(files_source);2622 read_symbols_from_files(files_source);
2625 2623
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
2626 err = 0;2631 err = 0;
2627 2632
2628 for (mod = modules; mod; mod = mod->next) {2633 for (mod = modules; mod; mod = mod->next) {