]> git.hungrycats.org Git - linux/commitdiff
kbuild: Warn on undefined exported symbols
authorKai Germaschewski <kai@tp1.ruhr-uni-bochum.de>
Sat, 15 Feb 2003 09:52:51 +0000 (03:52 -0600)
committerKai Germaschewski <kai@tp1.ruhr-uni-bochum.de>
Sat, 15 Feb 2003 09:52:51 +0000 (03:52 -0600)
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.

scripts/modpost.c

index 6da8241ce7a6a329654d834032b6ffc43658e8e4..a2fb406872b183a50324d412ae03dad46ee4332f 100644 (file)
@@ -397,7 +397,7 @@ add_versions(struct buffer *b, struct module *mod)
 
        for (s = mod->unres; s; s = s->next) {
                exp = find_symbol(s->name);
-               if (!exp) {
+               if (!exp || exp->module == mod) {
                        if (have_vmlinux)
                                fprintf(stderr, "*** Warning: \"%s\" [%s.ko] "
                                "undefined!\n", s->name, mod->name);
@@ -514,7 +514,6 @@ main(int argc, char **argv)
 {
        struct module *mod;
        struct buffer buf = { };
-       struct symbol *s;
        char fname[SZ];
 
        for (; argv[1]; argv++) {