Skip loading plugin library with unresolved symbols

This commit is contained in:
vdutta 2021-08-27 16:13:21 +05:30
parent 86383aed19
commit 1233fe9c93

View file

@ -187,10 +187,12 @@ int load_library_dynamic_arrays(struct dmctx *ctx)
char buf[512] = {0};
snprintf(buf, sizeof(buf), "%s/%s", LIBRARY_FOLDER_PATH, ent->d_name);
void *handle = dlopen(buf, RTLD_LAZY);
if (!handle) continue;
void *handle = dlopen(buf, RTLD_NOW|RTLD_LOCAL);
if (!handle) {
fprintf(stderr, "Plugin failed [%s]", dlerror());
continue;
}
dlerror(); /* Clear any existing error */
//Dynamic Object
DM_MAP_OBJ *dynamic_obj = NULL;