diff options
author | Dale Rahn <drahn@cvs.openbsd.org> | 2005-05-23 19:22:12 +0000 |
---|---|---|
committer | Dale Rahn <drahn@cvs.openbsd.org> | 2005-05-23 19:22:12 +0000 |
commit | 629d7ba9c6d9460e3ace845d7c0455aa9c7eeba0 (patch) | |
tree | cc9b3c9751665a386ad47c8b853aa2fca2ec93f7 /libexec/ld.so/library_subr.c | |
parent | 0cc57afd9f0fb72873642d528cec2016f9a0953e (diff) |
fixes for dlclose, ok kettenis@
Diffstat (limited to 'libexec/ld.so/library_subr.c')
-rw-r--r-- | libexec/ld.so/library_subr.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/libexec/ld.so/library_subr.c b/libexec/ld.so/library_subr.c index 07f69f9e24b..c2e7d8f8e81 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.4 2005/05/10 03:36:07 drahn Exp $ */ +/* $OpenBSD: library_subr.c,v 1.5 2005/05/23 19:22:11 drahn Exp $ */ /* * Copyright (c) 2002 Dale Rahn @@ -388,6 +388,16 @@ _dl_unlink_dlopen(elf_object_t *dep) } void +_dl_notify_unload_shlib(elf_object_t *object) +{ + struct dep_node *n; + + if (--object->refcount == 0) + for (n = object->first_child; n; n = n->next_sibling) + _dl_notify_unload_shlib(n->data); +} + +void _dl_unload_dlopen(void) { if (_dlopened_first_child != NULL) |