aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--scripts/mod/modpost.c16
1 files changed, 13 insertions, 3 deletions
diff --git a/scripts/mod/modpost.c b/scripts/mod/modpost.c
index 976adf152db..d901095ea8b 100644
--- a/scripts/mod/modpost.c
+++ b/scripts/mod/modpost.c
@@ -117,6 +117,7 @@ struct symbol {
117 unsigned int vmlinux:1; /* 1 if symbol is defined in vmlinux */ 117 unsigned int vmlinux:1; /* 1 if symbol is defined in vmlinux */
118 unsigned int kernel:1; /* 1 if symbol is from kernel 118 unsigned int kernel:1; /* 1 if symbol is from kernel
119 * (only for external modules) **/ 119 * (only for external modules) **/
120 unsigned int preloaded:1; /* 1 if symbol from Module.symvers */
120 char name[0]; 121 char name[0];
121}; 122};
122 123
@@ -186,9 +187,17 @@ static struct symbol *sym_add_exported(const char *name, struct module *mod)
186{ 187{
187 struct symbol *s = find_symbol(name); 188 struct symbol *s = find_symbol(name);
188 189
189 if (!s) 190 if (!s) {
190 s = new_symbol(name, mod); 191 s = new_symbol(name, mod);
191 192 } else {
193 if (!s->preloaded) {
194 warn("%s: duplicate symbol '%s' previous definition "
195 "was in %s%s\n", mod->name, name,
196 s->module->name,
197 is_vmlinux(s->module->name) ?"":".ko");
198 }
199 }
200 s->preloaded = 0;
192 s->vmlinux = is_vmlinux(mod->name); 201 s->vmlinux = is_vmlinux(mod->name);
193 s->kernel = 0; 202 s->kernel = 0;
194 return s; 203 return s;
@@ -706,7 +715,8 @@ static void read_dump(const char *fname, unsigned int kernel)
706 mod->skip = 1; 715 mod->skip = 1;
707 } 716 }
708 s = sym_add_exported(symname, mod); 717 s = sym_add_exported(symname, mod);
709 s->kernel = kernel; 718 s->kernel = kernel;
719 s->preloaded = 1;
710 sym_update_crc(symname, mod, crc); 720 sym_update_crc(symname, mod, crc);
711 } 721 }
712 return; 722 return;