[uclibc-ng-devel] dlclose() issue

Waldemar Brodkorb wbx at uclibc-ng.org
Sun Apr 15 14:02:10 CEST 2018


I have done some further debugging.
php -m loads ldap.so (a plugin for LDAP functions).
ldap.so depends on openldap libraries (libldap.so, ..) which
are by default loaded lazy (RTLD_LAZY). When I compile everything
and enforce direct loading via ld (-Wl,-z,now) the segfault
disappear. The problem is that dlclose() tries to run 
destructor functions (DT_FINI/DT_FINI_ARRAY) from libldap.so,
which was never bound.

What would be the correct way to prevent this?

Any hints are welcome.

best regards

More information about the devel mailing list