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

using shared libraries #137

Closed
dvtsantsynger opened this issue Mar 26, 2021 · 3 comments
Closed

using shared libraries #137

dvtsantsynger opened this issue Mar 26, 2021 · 3 comments
Labels
support Issues filed asking for help on using Cosmopolitan.

Comments

@dvtsantsynger
Copy link

Сan dlopen be used and is it cross-platform? Thanks!!

@jart jart added the support Issues filed asking for help on using Cosmopolitan. label Apr 2, 2021
@jart
Copy link
Owner

jart commented Apr 2, 2021

Right now dlopen is implemented as a stub that returns an error. I'd love to support dynamic shared objects but sadly they're deeply intertwined with the implementation details of the distro in question. On Linux distros, for example, all the .so files link the platform-specific C library, which would clash with Cosmopolitan. In the future, we might be able to offer dynamic code loading by a different means, but it's unlikely we'll ever be able to support seamless integration with the platform-specific methodology of dynamic code loading on each platform.

@pkulchenko
Copy link
Collaborator

Since loading of dynamic libraries was discussed in #215, I thought I'd also link the discussion on this topic that happened in #97. I still think that generating a library in a platform-portable (cosmopolitan-based) format is the best option, as it then can be handled by the cosmopolitan loader to load.

@pkulchenko
Copy link
Collaborator

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
support Issues filed asking for help on using Cosmopolitan.
Projects
None yet
Development

No branches or pull requests

3 participants