Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add constructor taking native_handle_t #69

Open
manipuladordedados opened this issue Feb 28, 2024 · 3 comments
Open

Add constructor taking native_handle_t #69

manipuladordedados opened this issue Feb 28, 2024 · 3 comments

Comments

@manipuladordedados
Copy link

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
Copy link
Author

any news?

@manipuladordedados
Copy link
Author

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
Copy link
Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant