Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 23698
b: refs/heads/master
c: 8e70c45
h: refs/heads/master
v: v3
  • Loading branch information
Sam Ravnborg committed Feb 19, 2006
1 parent 430d63f commit 10eb046
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 040fcc819a2e7783a570f4bdcdd1f2a7f5f06837
refs/heads/master: 8e70c45887a6bbe40393342ea5b426b0dd836dff
16 changes: 13 additions & 3 deletions trunk/scripts/mod/modpost.c
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,7 @@ struct symbol {
unsigned int vmlinux:1; /* 1 if symbol is defined in vmlinux */
unsigned int kernel:1; /* 1 if symbol is from kernel
* (only for external modules) **/
unsigned int preloaded:1; /* 1 if symbol from Module.symvers */
char name[0];
};

Expand Down Expand Up @@ -186,9 +187,17 @@ static struct symbol *sym_add_exported(const char *name, struct module *mod)
{
struct symbol *s = find_symbol(name);

if (!s)
if (!s) {
s = new_symbol(name, mod);

} else {
if (!s->preloaded) {
warn("%s: duplicate symbol '%s' previous definition "
"was in %s%s\n", mod->name, name,
s->module->name,
is_vmlinux(s->module->name) ?"":".ko");
}
}
s->preloaded = 0;
s->vmlinux = is_vmlinux(mod->name);
s->kernel = 0;
return s;
Expand Down Expand Up @@ -706,7 +715,8 @@ static void read_dump(const char *fname, unsigned int kernel)
mod->skip = 1;
}
s = sym_add_exported(symname, mod);
s->kernel = kernel;
s->kernel = kernel;
s->preloaded = 1;
sym_update_crc(symname, mod, crc);
}
return;
Expand Down

0 comments on commit 10eb046

Please sign in to comment.