Open manipuladordedados opened 8 months ago
any news?
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
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
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).