Lines Matching defs:module

1 /* Postprocess module symbol versions
6 * Based in part on module-init-tools/depmod.c,file2alias
31 /* If we are modposting external module set to 1 */
48 /* In kernel, this size is defined in linux/module.h;
150 static struct module *modules;
152 static struct module *find_module(const char *modname)
154 struct module *mod;
162 static struct module *new_module(const char *modname)
164 struct module *mod;
189 struct module *module;
216 * the list of unresolved symbols per module
232 static struct symbol *new_symbol(const char *name, struct module *module,
281 static bool module_imports_namespace(struct module *module,
284 return contains_namespace(module->imported_namespaces, namespace);
412 static struct symbol *sym_add_exported(const char *name, struct module *mod,
419 } else if (!external_module || s->module->is_vmlinux ||
420 s->module == mod) {
422 mod->name, name, s->module->name,
423 s->module->is_vmlinux ? "" : ".ko");
427 s->module = mod;
671 static void handle_modversion(const struct module *mod,
695 static void handle_symbol(struct module *mod, struct elf_info *info,
1163 * If a module parameter is declared __initdata and permissions=0
1977 * A module includes a number of sections that are discarded
1980 * marked __initdata will be discarded when the module has been initialized.
1983 * only when a module is unloaded which never happens for built-in modules.
1988 static void check_sec_ref(struct module *mod, const char *modname,
2027 struct module *mod;
2115 /* Our trick to get versioning for module struct etc. - it's
2177 fatal("GPL-incompatible module %s.ko uses GPL-only symbol '%s'\n",
2181 fatal("GPL-incompatible module %s.ko uses GPL-only symbol marked UNUSED '%s'\n",
2185 warn("GPL-incompatible module %s.ko uses future GPL-only symbol '%s'\n",
2201 warn("module %s.ko uses symbol '%s' marked UNUSED\n",
2210 static int check_exports(struct module *mod)
2218 if (!exp || exp->module == mod) {
2237 "module %s uses symbol %s from namespace %s, but does not import it.\n",
2252 static int check_modname_len(struct module *mod)
2262 merror("module name is too long [%s.ko]\n", mod->name);
2272 static void add_header(struct buffer *b, struct module *mod)
2274 buf_printf(b, "#include <linux/module.h>\n");
2276 * Include build-salt.h after module.h in order to
2289 buf_printf(b, "__visible struct module __this_module\n");
2325 static int add_versions(struct buffer *b, struct module *mod)
2332 if (!exp || exp->module == mod)
2334 s->module = exp->module;
2347 if (!s->module)
2369 static void add_depends(struct buffer *b, struct module *mod)
2376 if (s->module)
2377 s->module->seen = s->module->is_vmlinux;
2383 if (!s->module)
2386 if (s->module->seen)
2389 s->module->seen = 1;
2390 p = strrchr(s->module->name, '/');
2394 p = s->module->name;
2401 static void add_srcversion(struct buffer *b, struct module *mod)
2465 * 0x12345678<tab>symbol<tab>module<tab>export<tab>namespace
2481 struct module *mod;
2527 if (!symbol->module->from_dump) {
2531 symbol->module->name,
2544 struct module *mod;
2572 struct module *mod;
2687 s->name, s->module->name,