summaryrefslogtreecommitdiff
path: root/libexec/ld.so/dlfcn.c
diff options
context:
space:
mode:
authorKurt Miller <kurt@cvs.openbsd.org>2005-10-10 16:33:52 +0000
committerKurt Miller <kurt@cvs.openbsd.org>2005-10-10 16:33:52 +0000
commitb7b56e44d205a5b3350a6647f2da66dcd4897a89 (patch)
tree247ee53bb3a6c8586bb7e607998b15b343d877ee /libexec/ld.so/dlfcn.c
parent4d7328af0d8545d1c5e98867adc169655e14f971 (diff)
set _dl_loading_object to NULL upon entering and exiting _dl_boot and
dlopen and cleanup of related redundant code. looks fine drahn@
Diffstat (limited to 'libexec/ld.so/dlfcn.c')
-rw-r--r--libexec/ld.so/dlfcn.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/libexec/ld.so/dlfcn.c b/libexec/ld.so/dlfcn.c
index e363e9a7d44..8f8f0eca316 100644
--- a/libexec/ld.so/dlfcn.c
+++ b/libexec/ld.so/dlfcn.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: dlfcn.c,v 1.66 2005/10/09 04:29:13 kurt Exp $ */
+/* $OpenBSD: dlfcn.c,v 1.67 2005/10/10 16:33:51 kurt Exp $ */
/*
* Copyright (c) 1998 Per Fogelstrom, Opsycon AB
@@ -60,6 +60,8 @@ dlopen(const char *libname, int flags)
_dl_thread_kern_stop();
+ _dl_loading_object = NULL;
+
object = _dl_load_shlib(libname, _dl_objects, OBJTYPE_DLO, flags);
if (object == 0) {
DL_DEB(("dlopen: failed to open %s\n", libname));
@@ -67,8 +69,6 @@ dlopen(const char *libname, int flags)
goto loaded;
}
- _dl_loading_object = object;
-
_dl_link_dlopen(object);
if (OBJECT_REF_CNT(object) > 1)
@@ -78,7 +78,6 @@ dlopen(const char *libname, int flags)
_dl_add_object(object);
DL_DEB(("head [%s]\n", object->load_name ));
- object->load_object = object;
n = _dl_malloc(sizeof *n);
if (n == NULL)