diff options
Diffstat (limited to 'ldso/libdl/libdl.c')
-rw-r--r-- | ldso/libdl/libdl.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/ldso/libdl/libdl.c b/ldso/libdl/libdl.c index 52c77b00a..49e90d042 100644 --- a/ldso/libdl/libdl.c +++ b/ldso/libdl/libdl.c @@ -288,7 +288,7 @@ void *dlopen(const char *libname, int flag) #endif /* A bit of sanity checking... */ - if (!(flag & (RTLD_LAZY|RTLD_NOW))) { + if (!(flag & (RTLD_LAZY|RTLD_NOW|RTLD_NOLOAD))) { _dl_error_number = LD_BAD_HANDLE; return NULL; } @@ -358,8 +358,9 @@ void *dlopen(const char *libname, int flag) /* Try to load the specified library */ _dl_if_debug_print("Trying to dlopen '%s', RTLD_GLOBAL:%d RTLD_NOW:%d\n", (char*)libname, (flag & RTLD_GLOBAL ? 1:0), (now_flag & RTLD_NOW ? 1:0)); - tpnt = _dl_load_shared_library(0, &rpnt, tfrom, (char*)libname, 0); + tpnt = _dl_load_shared_library((flag & RTLD_NOLOAD) ? DL_RESOLVE_NOLOAD : 0, + &rpnt, tfrom, (char*)libname, 0); if (tpnt == NULL) { _dl_unmap_cache(); return NULL; |