Add a workaround for statically linked kernels.
This commit is contained in:
parent
7fe55eb5ba
commit
51e2fa23ed
@ -237,6 +237,8 @@ linker_file_unregister_sysctls(linker_file_t lf)
|
||||
sysctl_unregister_set(sysctls);
|
||||
}
|
||||
|
||||
extern struct linker_set modmetadata_set;
|
||||
|
||||
static int
|
||||
linker_file_register_modules(linker_file_t lf)
|
||||
{
|
||||
@ -251,6 +253,10 @@ linker_file_register_modules(linker_file_t lf)
|
||||
|
||||
modules = (struct linker_set*)
|
||||
linker_file_lookup_symbol(lf, "modmetadata_set", 0);
|
||||
|
||||
if (!modules && lf == linker_kernel_file)
|
||||
modules = &modmetadata_set;
|
||||
|
||||
mcount = 0;
|
||||
if (modules) {
|
||||
for (mdpp = (struct mod_metadata**)modules->ls_items; *mdpp; mdpp++) {
|
||||
|
Loading…
Reference in New Issue
Block a user