Set have_vmlinux flag in a single place.
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
mod->next = modules;
modules = mod;
+ if (mod->is_vmlinux)
+ have_vmlinux = 1;
+
return mod;
}
mod = new_module(modname);
- if (mod->is_vmlinux)
- have_vmlinux = 1;
-
if (!mod->is_vmlinux) {
license = get_modinfo(&info, "license");
if (!license)
mod = find_module(modname);
if (!mod) {
mod = new_module(modname);
- if (mod->is_vmlinux)
- have_vmlinux = 1;
mod->from_dump = 1;
}
s = sym_add_exported(symname, mod, export_no(export));