Axel.Naumann at cern.ch
Wed Oct 10 09:50:06 PDT 2012
We need to support unloading of shared libraries. I'd like to continue
using sys::DynamicLibrary. Few questions:
* Is there a fundamental reason not to implement UnloadLibrary?
* Would it be necessary to implement some fancy symbol use-check for
unloading, or would it be fine to make this a "use at your own risk"
operation? At least as a first implementation?
* I would also implement a second loader function, a non-permanent one,
and only allow unloading of those. Use checking could then happen only
for the non-permanent ones (later); e.g. by tracking
SearchForAddressOfSymbol() and requiring a symmetrical ReleaseSymbol().
* The doc for LoadLibraryPermanently() says "Use this instead of
getPermanentLibrary() when..." but then just calls getPermanentLibrary()
nonetheless. That's a doc bug, right?
More information about the llvm-dev