summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDale Rahn <drahn@cvs.openbsd.org>2005-03-08 20:02:00 +0000
committerDale Rahn <drahn@cvs.openbsd.org>2005-03-08 20:02:00 +0000
commit9bf8925d50defecec9a4bbbdb192af914fc6308f (patch)
tree589eb51c4e71ed750832adacff28ccdf1c1993ce
parenta3b0f021e679b876995e38de16c0b865bc44ab59 (diff)
Do not shadow a parameter with a local variable. also add a debug statement
to print dependandant libraries loaded by dlopen ok kurt@
-rw-r--r--libexec/ld.so/dlfcn.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/libexec/ld.so/dlfcn.c b/libexec/ld.so/dlfcn.c
index 7bf01752a7e..fff632ee745 100644
--- a/libexec/ld.so/dlfcn.c
+++ b/libexec/ld.so/dlfcn.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: dlfcn.c,v 1.43 2005/03/07 20:50:11 kettenis Exp $ */
+/* $OpenBSD: dlfcn.c,v 1.44 2005/03/08 20:01:59 drahn Exp $ */
/*
* Copyright (c) 1998 Per Fogelstrom, Opsycon AB
@@ -84,15 +84,17 @@ dlopen(const char *libname, int flags)
elf_object_t *tmpobj = dynobj;
for (dynp = dynobj->load_dyn; dynp->d_tag; dynp++) {
- const char *libname;
+ const char *deplibname;
elf_object_t *depobj;
if (dynp->d_tag != DT_NEEDED)
continue;
- libname = dynobj->dyn.strtab + dynp->d_un.d_val;
+ deplibname = dynobj->dyn.strtab + dynp->d_un.d_val;
+ DL_DEB(("dlopen: loading: %s required by %s\n",
+ deplibname, libname));
_dl_thread_kern_stop();
- depobj = _dl_load_shlib(libname, dynobj, OBJTYPE_LIB,
+ depobj = _dl_load_shlib(deplibname, dynobj, OBJTYPE_LIB,
flags|RTLD_GLOBAL);
if (!depobj)
_dl_exit(4);