Loading libraries from memory or jar files

Pedro Lamarão pedro.lamarao at prodist.com.br
Thu Jan 16 18:54:27 UTC 2025


Hi Chris!
as a way forward, see for example FreeBSD's fdlopen:
https://man.freebsd.org/cgi/man.cgi?fdlopen(3)
Generally, we need the dynamic loader to allow loading from alternative
storage.
Atte.
Pedro.



Em qui., 16 de jan. de 2025 às 15:48, Chris Vest <mr.chrisvest at gmail.com>
escreveu:

> Hi,
>
> SymbolLookup and the older System.load/loadLibrary all make the assumption
> that any library we wish to load is located in a file on the, er, "native"
> file system.
>
> I guess this is a limitation inherited from dlopen and LoadLibrary.
>
> Many Java projects that include native code, then tend to package their
> native libraries as part of their jar files, and extract them to /tmp, or
> the like, before loading them.
>
> This old practice is starting to become problematic, since /tmp is now
> often mounted with noexec for security.
>
> So, is there some possible path forward that'll allow us to load libraries
> from e.g. a memory segment instead of a file?
>
> Thanks,
> Chris
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/panama-dev/attachments/20250116/45c639e6/attachment.htm>


More information about the panama-dev mailing list