module loading - use local symbols to avoid symbol table clashes

the mod init/shutdown syms already are bad infesting the global sym
table. keep modules local/isolated and we'll be better off.
This commit is contained in:
Carsten Haitzler 2018-05-15 15:28:53 +09:00
parent 2e5be79c45
commit 757f7a7279
2 changed files with 2 additions and 2 deletions

View File

@ -392,7 +392,7 @@ e_module_new(const char *name)
m->error = 1;
goto init_done;
}
m->handle = dlopen(modpath, (RTLD_NOW | RTLD_GLOBAL));
m->handle = dlopen(modpath, (RTLD_NOW | RTLD_LOCAL));
if (!m->handle)
{
snprintf(body, sizeof(body),

View File

@ -71,7 +71,7 @@ e_modapi_init(E_Module *m)
else
snprintf(buf, sizeof(buf), "%s/%s/%s",
e_module_dir_get(m), MODULE_ARCH, file);
handle = dlopen(buf, RTLD_NOW | RTLD_GLOBAL);
handle = dlopen(buf, RTLD_NOW | RTLD_LOCAL);
if (handle)
e_wizard_page_add(handle, file,
dlsym(handle, "wizard_page_init"),