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/resolve.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/resolve.c')
-rw-r--r-- | libexec/ld.so/resolve.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/libexec/ld.so/resolve.c b/libexec/ld.so/resolve.c index 2cc2c5ff160..8034492209c 100644 --- a/libexec/ld.so/resolve.c +++ b/libexec/ld.so/resolve.c @@ -1,4 +1,4 @@ -/* $OpenBSD: resolve.c,v 1.36 2005/09/28 20:35:23 drahn Exp $ */ +/* $OpenBSD: resolve.c,v 1.37 2005/10/01 19:32:22 drahn Exp $ */ /* * Copyright (c) 1998 Per Fogelstrom, Opsycon AB @@ -171,6 +171,17 @@ void _dl_cleanup_objects() { elf_object_t *nobj, *head; + struct dep_node *n; + +retry: + TAILQ_FOREACH(n, &_dlopened_child_list, next_sib) { + if (n->data->refcount == 0) { + TAILQ_REMOVE(&_dlopened_child_list, n, next_sib); + _dl_free(n); + goto retry; + } + } + head = free_objects; free_objects = NULL; while (head != NULL) { |