summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/core/lt_path.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/core/lt_path.c b/src/core/lt_path.c
index 6103119..3fb0385 100644
--- a/src/core/lt_path.c
+++ b/src/core/lt_path.c
@@ -479,7 +479,16 @@ struct lt_modctx * lt_dlopenadvise(const char * module, struct lt_modctl * modct
void * lt_dlsym(struct lt_modctx * modctx, const char * symname)
{
- return dlsym(modctx->maddr,symname);
+ const struct lt_symdef * sym;
+
+ if (modctx->maddr)
+ return dlsym(modctx->maddr,symname);
+
+ for (sym=modctx->symtbl; sym->name; sym++)
+ if (!strcmp(sym->name,symname))
+ return sym->address;
+
+ return 0;
}
int lt_dlclose(struct lt_modctx * modctx)