summaryrefslogtreecommitdiff
path: root/libexec/ld.so/library_mquery.c
diff options
context:
space:
mode:
authorKurt Miller <kurt@cvs.openbsd.org>2005-10-03 19:48:25 +0000
committerKurt Miller <kurt@cvs.openbsd.org>2005-10-03 19:48:25 +0000
commitf0ec10f99ceed98f7aca872885d459d0b94f085b (patch)
tree58b09869d6b5e51c92af23da6035bb0faf4d674c /libexec/ld.so/library_mquery.c
parentdc1076a067eafa18a3b9c5f0ca9732efc6e5856b (diff)
refcount corrections: count common dep libs once and centralize dep lib
refcount increments to _dl_link_sub. adjust _dl_notify_unload_shlib to match new refcount method. ok drahn@
Diffstat (limited to 'libexec/ld.so/library_mquery.c')
-rw-r--r--libexec/ld.so/library_mquery.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/libexec/ld.so/library_mquery.c b/libexec/ld.so/library_mquery.c
index a0b3532825f..2ac6a12ed05 100644
--- a/libexec/ld.so/library_mquery.c
+++ b/libexec/ld.so/library_mquery.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: library_mquery.c,v 1.27 2005/10/01 19:32:22 drahn Exp $ */
+/* $OpenBSD: library_mquery.c,v 1.28 2005/10/03 19:48:24 kurt Exp $ */
/*
* Copyright (c) 2002 Dale Rahn
@@ -95,12 +95,10 @@ _dl_tryload_shlib(const char *libname, int type, int flags)
object = _dl_lookup_object(libname);
if (object) {
- object->refcount++;
object->load_object->obj_flags |= flags & RTLD_GLOBAL;
if (object->load_object != object &&
object->load_object != _dl_objects &&
object->load_object != _dl_loading_object) {
- object->load_object->refcount++;
if (_dl_loading_object == NULL)
_dl_loading_object = object;
_dl_link_sub(object->load_object, _dl_loading_object);
@@ -122,13 +120,11 @@ _dl_tryload_shlib(const char *libname, int type, int flags)
for (object = _dl_objects; object != NULL; object = object->next) {
if (object->dev == sb.st_dev &&
object->inode == sb.st_ino) {
- object->refcount++;
object->load_object->obj_flags |= flags & RTLD_GLOBAL;
_dl_close(libfile);
if (object->load_object != object &&
object->load_object != _dl_objects &&
object->load_object != _dl_loading_object) {
- object->load_object->refcount++;
if (_dl_loading_object == NULL)
_dl_loading_object = object;
_dl_link_sub(object->load_object,