Commit 2763b6bc authored by Kai Germaschewski's avatar Kai Germaschewski

kbuild: Warn on undefined exported symbols

modpost did not warn on symbols which are exported but not defined
in the current module, but it should.

Also, fix a compile time warning, and have bk ignore *.mod.c files.
parent 8dc34ec5
...@@ -397,7 +397,7 @@ add_versions(struct buffer *b, struct module *mod) ...@@ -397,7 +397,7 @@ add_versions(struct buffer *b, struct module *mod)
for (s = mod->unres; s; s = s->next) { for (s = mod->unres; s; s = s->next) {
exp = find_symbol(s->name); exp = find_symbol(s->name);
if (!exp) { if (!exp || exp->module == mod) {
if (have_vmlinux) if (have_vmlinux)
fprintf(stderr, "*** Warning: \"%s\" [%s.ko] " fprintf(stderr, "*** Warning: \"%s\" [%s.ko] "
"undefined!\n", s->name, mod->name); "undefined!\n", s->name, mod->name);
...@@ -514,7 +514,6 @@ main(int argc, char **argv) ...@@ -514,7 +514,6 @@ main(int argc, char **argv)
{ {
struct module *mod; struct module *mod;
struct buffer buf = { }; struct buffer buf = { };
struct symbol *s;
char fname[SZ]; char fname[SZ];
for (; argv[1]; argv++) { for (; argv[1]; argv++) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment