]> CyberLeo.Net >> Repos - FreeBSD/stable/8.git/commit
MFC r214728:
authorkib <kib@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Wed, 10 Nov 2010 08:46:29 +0000 (08:46 +0000)
committerkib <kib@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Wed, 10 Nov 2010 08:46:29 +0000 (08:46 +0000)
commit6e821ca83f864d8e0dd40cf0ba0802b8316a709a
tree60d86b643a559d58182fe6832054cf7691f70656
parentaf50d657cf792d16c20170fb239cc5ec7d019591
MFC r214728:
If dlopen() is called for the dso that has been already loaded as a
dependency, then the dso never has its DAG initialized. Empty DAG
makes ref_dag() call in dlopen() a nop, and the dso refcount is off
by one.

Initialize the DAG on the first dlopen() call, using a boolean flag
to prevent double initialization.

MFC r214776:
Fix style.

MFC r214777:
Change init_dag() to not increment DAG refcount. Unconditionally call
both init_dag() and ref_dag() in dlopen() for the case when the object
was already loaded.

git-svn-id: svn://svn.freebsd.org/base/stable/8@215084 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
libexec/rtld-elf/rtld.c
libexec/rtld-elf/rtld.h