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 */
unsigned int is_static:1; /* 1 if symbol is not global */
enum export export; /* Type of export */
char name[0];
if (!s) {
s = new_symbol(name, mod, export);
} else {
- if (!s->preloaded) {
+ if (!external_module || is_vmlinux(s->module->name) ||
+ s->module == mod) {
warn("%s: '%s' exported twice. Previous export was in %s%s\n",
mod->name, name, s->module->name,
is_vmlinux(s->module->name) ? "" : ".ko");
s->module = mod;
}
}
- s->preloaded = 0;
s->vmlinux = is_vmlinux(mod->name);
s->kernel = 0;
s->export = export;
}
s = sym_add_exported(symname, mod, export_no(export));
s->kernel = kernel;
- s->preloaded = 1;
s->is_static = 0;
sym_set_crc(symname, crc);
sym_update_namespace(symname, namespace);