summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--scripts/mod/modpost.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/scripts/mod/modpost.c b/scripts/mod/modpost.c
index c7cfeeb088f7..969a081dba62 100644
--- a/scripts/mod/modpost.c
+++ b/scripts/mod/modpost.c
@@ -2147,13 +2147,18 @@ static void check_exports(struct module *mod)
for (s = mod->unres; s; s = s->next) {
const char *basename;
exp = find_symbol(s->name);
- if (!exp || exp->module == mod) {
+ if (!exp) {
if (!s->weak && nr_unresolved++ < MAX_UNRESOLVED_REPORTS)
modpost_log(warn_unresolved ? LOG_WARN : LOG_ERROR,
"\"%s\" [%s.ko] undefined!\n",
s->name, mod->name);
continue;
}
+ if (exp->module == mod) {
+ error("\"%s\" [%s.ko] was exported without definition\n",
+ s->name, mod->name);
+ continue;
+ }
basename = strrchr(mod->name, '/');
if (basename)
basename++;