You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the case where some external entity has already loaded the shared library plugins into the address space for us, it would be good to have API to essentially (in libdl terms here) wrap
dlsym(nullptr, "libfunc_ep_" + pluginname); // the expression in the latter argument is the runtime form of LIBFUNC_DETAIL_EP_NAME(PLUGINNAME)
It would only initially work on non-DLL (non-Windows) platforms where all symbols get exported (since Windows we only currently export the single commonly-named trampoline entry point), but since it would be most useful in weird/constrained deployment scenarios (think Android) - that would be OK.
So actually this wouldn't need new API - it would just be an additional step in the existing implementation, based on a decision of semantics: do you check for an already-loaded library before or after you try to load the library you've been told to? In the first case, you try the dlsym(0) before the library loading, and the second case, you try it after library loading fails, before throwing an exception. Would want to slightly refactor the implementation to get the funny entry point casting in its own function so you could pass 0 or a real handle in as the first arg to dlsym, but either way, not too bad overall.
In the case where some external entity has already loaded the shared library plugins into the address space for us, it would be good to have API to essentially (in libdl terms here) wrap
It would only initially work on non-DLL (non-Windows) platforms where all symbols get exported (since Windows we only currently export the single commonly-named trampoline entry point), but since it would be most useful in weird/constrained deployment scenarios (think Android) - that would be OK.
cc @JeroMiya
The text was updated successfully, but these errors were encountered: