summaryrefslogtreecommitdiff
path: root/libexec/ld.so/resolve.c
diff options
context:
space:
mode:
authorMatthew Dempsky <matthew@cvs.openbsd.org>2012-07-06 23:15:51 +0000
committerMatthew Dempsky <matthew@cvs.openbsd.org>2012-07-06 23:15:51 +0000
commitf02ad9249c30f685b86595c434a87ba99f7ed7c1 (patch)
tree715eaf360bec4f72fa858550bc5010eb828577e1 /libexec/ld.so/resolve.c
parentd1950ce78cc5a8a8b7f0bd2c77261c67b5cfe2e5 (diff)
Fix LD_DEBUG=1 regression introduced by previous commit.
ok kurt
Diffstat (limited to 'libexec/ld.so/resolve.c')
-rw-r--r--libexec/ld.so/resolve.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/libexec/ld.so/resolve.c b/libexec/ld.so/resolve.c
index 26c26ccf24d..ecd2e975d51 100644
--- a/libexec/ld.so/resolve.c
+++ b/libexec/ld.so/resolve.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: resolve.c,v 1.58 2012/06/14 21:30:50 kettenis Exp $ */
+/* $OpenBSD: resolve.c,v 1.59 2012/07/06 23:15:50 matthew Exp $ */
/*
* Copyright (c) 1998 Per Fogelstrom, Opsycon AB
@@ -115,7 +115,6 @@ _dl_finalize_object(const char *objname, Elf_Dyn *dynp, Elf_Phdr *phdrp,
* as it is either executable, or dlopened()
*/
_dl_loading_object = object;
- DL_DEB(("head %s\n", object->load_name));
}
if ((object->obj_flags & DF_1_NOOPEN) != 0 &&
@@ -168,6 +167,8 @@ _dl_finalize_object(const char *objname, Elf_Dyn *dynp, Elf_Phdr *phdrp,
object->obj_base = obase;
object->load_name = _dl_strdup(objname);
object->load_object = _dl_loading_object;
+ if (object->load_object == object)
+ DL_DEB(("head %s\n", object->load_name));
DL_DEB(("obj %s has %s as head\n", object->load_name,
_dl_loading_object->load_name ));
object->refcount = 0;