diff options
author | Dale Rahn <drahn@cvs.openbsd.org> | 2005-10-01 19:32:23 +0000 |
---|---|---|
committer | Dale Rahn <drahn@cvs.openbsd.org> | 2005-10-01 19:32:23 +0000 |
commit | 34cc8abaf39119e92cdf89258a084f4d8ccb1749 (patch) | |
tree | d0ecf55e51e19034482806c45159b67034eb408f /libexec/ld.so/library_subr.c | |
parent | 038a92308d23043d05543461cc755bf9140d5e3b (diff) |
handle references to load groups caused by dlopen()ing of depenant
members of the load group. work by kurt@ and myself
Diffstat (limited to 'libexec/ld.so/library_subr.c')
-rw-r--r-- | libexec/ld.so/library_subr.c | 27 |
1 files changed, 5 insertions, 22 deletions
diff --git a/libexec/ld.so/library_subr.c b/libexec/ld.so/library_subr.c index 1fe3c55d206..2fab10ca73b 100644 --- a/libexec/ld.so/library_subr.c +++ b/libexec/ld.so/library_subr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: library_subr.c,v 1.13 2005/09/28 20:48:00 kurt Exp $ */ +/* $OpenBSD: library_subr.c,v 1.14 2005/10/01 19:32:22 drahn Exp $ */ /* * Copyright (c) 2002 Dale Rahn @@ -349,31 +349,14 @@ _dl_link_dlopen(elf_object_t *dep) } void -_dl_unlink_dlopen(elf_object_t *dep) -{ - - struct dep_node *dnode; - - TAILQ_FOREACH(dnode, &_dlopened_child_list, next_sib) - if (dnode->data == dep) - break; - - if (dnode == NULL) /* XXX - not found? */ - return; - - TAILQ_REMOVE(&_dlopened_child_list, dnode, next_sib); - - _dl_free(dnode); -} - -void _dl_notify_unload_shlib(elf_object_t *object) { struct dep_node *n; - if (--object->refcount == 0) - TAILQ_FOREACH(n, &object->child_list, next_sib) - _dl_notify_unload_shlib(n->data); + object->refcount--; + + TAILQ_FOREACH(n, &object->child_list, next_sib) + n->data->refcount--; } void |