|
|
@ -704,13 +704,11 @@ static struct module * __load_resource(const char *resource_name,
|
|
|
|
|
|
|
|
|
|
|
|
/* open in a sane way */
|
|
|
|
/* open in a sane way */
|
|
|
|
cur->lib = dlopen(fn, RTLD_NOW | RTLD_LOCAL);
|
|
|
|
cur->lib = dlopen(fn, RTLD_NOW | RTLD_LOCAL);
|
|
|
|
if (cur->lib) {
|
|
|
|
if (cur->lib &&
|
|
|
|
if ((m = find_symbol(cur, "mod_data", 0)) == NULL ||
|
|
|
|
((m = find_symbol(cur, "mod_data", 0)) == NULL || (m->flags & MOD_MASK) == MOD_0)) {
|
|
|
|
(m->flags & MOD_MASK) == MOD_0) {
|
|
|
|
|
|
|
|
/* old-style module, close and reload with standard flags */
|
|
|
|
/* old-style module, close and reload with standard flags */
|
|
|
|
dlclose(cur->lib);
|
|
|
|
dlclose(cur->lib);
|
|
|
|
cur->lib = NULL;
|
|
|
|
cur->lib = NULL;
|
|
|
|
}
|
|
|
|
|
|
|
|
m = NULL;
|
|
|
|
m = NULL;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (cur->lib == NULL) /* try reopen with the old style */
|
|
|
|
if (cur->lib == NULL) /* try reopen with the old style */
|
|
|
|