Ralf Wildenhues wrote: > * Daniel Herring wrote on Mon, Nov 12, 2007 at 07:46:55AM CET: >> >> Here's a relevant post from the GCC list; it mentions how to work around >> some dlopen difficulties (including RTTI, exceptions, custom >> new/delete). >> http://gcc.gnu.org/ml/gcc-help/2007-10/msg00248.html > > Thanks for this link. FWIW, I could not easily see why RTLD_NOW should > be needed. If it is, there's an opportunity to extend libltdl's advise > API for this flag.
I don't think RTLD_NOW is strictly needed. Instead, it forces everything (including RTTI and exception class constructors) to resolve correctly before dlopen succeeds. If you're trying to catch exceptions, its probably unnerving to get an unresolved symbol error that only occurs when you try to throw the exception... Always using dlopen(RTLD_NOW) should prevent such gotchas. - Daniel _______________________________________________ http://lists.gnu.org/mailman/listinfo/libtool