We want to be able to load nif code from archives.
The fallback approach to this would be to create a temp file that we dlopen and then unlink directly afterward.
For most platforms, we should be able to load the memory directly by using some platform specific features/hacks:
Linux: memfd_create + dlopen of /proc/self/fd/%d
Windows: https://github.com/py2exe/py2exe/blob/master/source/MyLoadLibrary.c
OS X: https://stackoverflow.com/questions/11821955/load-dynamic-library-from-memory
FreeBSD/DragonFly: https://www.freebsd.org/cgi/man.cgi?query=fdlopen&sektion=3,
Android: https://github.com/google/iree/issues/3845
There is also a bit of discussion here: https://github.com/erlang/otp/pull/3002
Original reporter:
lukasAffected version:
Not SpecifiedComponent:
ertsMigrated from: https://bugs.erlang.org/browse/ERL-1475