rtld: Add write-lock to case of filter loading
Propagate the current state of rtld_bind_lock to dlopen_object() calls
through the filter loading call chain. This fixes attempts to
write-lock the already locked rtld_bind_lock when filter loading is
initiated by relocation of dlopening dso.
Taken from: FreeBSD SVN 234170 (12 APR 2012)
Do not try to adjust stacks if dlopen_object is called too early. This
is a follow-up to FreeBSD SVN 233231 which fixed a similar issue with
object initialization code.
Taken from: FreeBSD SVN 233777 (02 APR 2012)