summaryrefslogtreecommitdiff
path: root/ldso/libdl
diff options
context:
space:
mode:
authorJoakim Tjernlund <joakim.tjernlund@transmode.se>2004-08-26 14:00:04 +0000
committerJoakim Tjernlund <joakim.tjernlund@transmode.se>2004-08-26 14:00:04 +0000
commitee55de4929e149035712f805baeb391e121615a4 (patch)
tree711626100b96e6245e90fcab2427bb20a555d86d /ldso/libdl
parentf8666418a90c3e1ebe5fe63d2249a16a1ca3190b (diff)
Added test for RTLD_GLOBAL flag in _dl_find_hash().
Fixed a bug in libdl.c where the RTLD_GLOBAL was assigned wronly.
Diffstat (limited to 'ldso/libdl')
-rw-r--r--ldso/libdl/libdl.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/ldso/libdl/libdl.c b/ldso/libdl/libdl.c
index 6c4e9843b..8199a7598 100644
--- a/ldso/libdl/libdl.c
+++ b/ldso/libdl/libdl.c
@@ -223,13 +223,14 @@ void *dlopen(const char *libname, int flag)
_dl_memset (dyn_ptr->next, 0, sizeof (struct dyn_elf));
dyn_ptr = dyn_ptr->next;
dyn_ptr->dyn = tpnt1;
- tpnt->rtld_flags |= RTLD_GLOBAL;
if (!tpnt1) {
tpnt1 = _dl_load_shared_library(0, &rpnt, tcurr, lpntstr, 0);
+ dyn_ptr->dyn = tpnt1;
if (!tpnt1)
goto oops;
- dyn_ptr->dyn = tpnt1;
+ tpnt1->rtld_flags |= RTLD_GLOBAL;
} else {
+ tpnt1->rtld_flags |= RTLD_GLOBAL;
tpnt1->usage_count++;
}
}