dll icon indicating copy to clipboard operation
dll copied to clipboard

Add constructor taking native_handle_t

Open manipuladordedados opened this issue 2 years ago • 3 comments

FreeBSD exposes fdlopen() which allows one to dlopen() from a file descriptor. That's the only way to load plugins in capsicum mode. dlopen() and all functions that try to access the filesystem through pathnames fail under capsicum mode (ENOTCAPABLE).

Boost.Dll doesn't need to add functionality that can only be supported under FreeBSD (fdlopen()), but it should be very useful if the ifdef portability blocks only exist to initialize boost::dll::shared_library and nothing else (a small fdlopen() in my source at the beginning and then the rest of the code is the same for all platforms).

manipuladordedados avatar Feb 28 '24 00:02 manipuladordedados

any news?

manipuladordedados avatar May 06 '24 21:05 manipuladordedados

fdlopen() is not just a FreeBSD feature; it also exists in Android's libc (Linux). ANDROID_DLEXT_USE_LIBRARY_FD and library_fd in android_dlopen_ext(): https://developer.android.com/ndk/reference/structandroid/dlextinfo

manipuladordedados avatar Jul 12 '24 21:07 manipuladordedados

It seems that the musl maintainers are also aware of this need, which might add weight to the importance and potential adoption of this interface across different platforms and libraries.

@apolukhin

manipuladordedados avatar Jul 18 '24 16:07 manipuladordedados