go-memexec
go-memexec copied to clipboard
How do I ensure that multiple dependent library files are called?
First of all, thank you for your work, it was great.
Currently only a single executable can be called, but in practice we encounter programs that may also call multiple dynamic library files or other dependencies, in which case go-memexec will indicate that the dependency file does not exist.
foo.exe
bar.dll
If foo depends on bar,go-memexec will indicate that the dependency file bar.dll does not exist.I used the embedded filesystem to fix it and it failed
If there is a file system embedded, is it possible to export this file system to the cache directory as well? This should solve the problem of non-existent files
I have done it with C and Go. But I needed to work the C Code for all platforms. Linux and Windows actually is working. OSX/Darwin is problematic atm.
I'd create a tempdir, copy the binary along with all dependencies there and run it with LD_PRELOAD_PATH={tempdir} env var on Linux, I believe other platforms have similar ways to override dynamic library path.