This is the mail archive of the libc-help@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: dlclose() doesn't call dtor for some .so files


On 07/16/2012 09:55 PM, Mike Frysinger wrote:
On Monday 16 July 2012 23:56:43 Skunk Worx wrote:
I am running into the same problem described in the following thread :

http://gcc.gnu.org/ml/gcc-help/2011-05/msg00403.html

The destructor doesn't get called when the library is dlclose()'d.

The linked thread suggests that this may be a glibc issue.

you could try using LD_DEBUG=all and see what kind of output you get. -mike

Running the gcc-help test case with LD_DEBUG=all shows a binding taking place such that a libboost symbol is resolving to a symbol in libchild. This seems backwards.


This may be due to the search order of the files -- ldd looked in libchild, in the local directory, before libboost.

Perhaps this is creating something like a circular dependency that does not allow the two libraries to be closed.

Both Xerces and Boost use C++ templates, which can generate a lot of symbols.

11162: binding file /usr/lib64/libboost_signals.so.5 [0] to ./libchild.so [0]: normal symbol `_ZN5boost9function2IbNS_7signals6detail12stored_groupES3_ED1Ev'

---
John


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]