Jaakko Heinonen 4ef75f147a If dlclose() is called recursively from a _fini() function, the inner
dlclose() call may unload the object of the outer call prematurely
because objects are unreferenced before _fini() calls.

Fix this by unreferencing objects after calling objlist_call_fini() in
dlclose(). Therefore objlist_call_fini() now calls the fini function if
the reference count of an object is 1. In addition we must restart the
list_fini traversal after every _fini() call because another dlclose()
call might have modified the reference counts.

Add an XXX comment to objlist_call_fini() about possible race with
dlopen().

PR:		133246, 149464
Reviewed by:	kan, kib
2010-12-16 16:56:44 +00:00
..
2010-12-06 10:24:06 +00:00
2010-02-26 09:41:16 +00:00
2010-11-09 10:59:09 +00:00
2010-02-26 09:41:16 +00:00
2009-12-03 15:48:24 +00:00