lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]

> besides, it is not guaranteed to work. the fact that the executable is statically linked
> with no exported functions, means there is no guarantee the code for all the API functions
> even exist (as callable entry) in the binary file, because the compiler and linker can do
> aggressive optimizations to remove or transform the code.

This describes my case well and is the main reason why having a proxy
library wasn't going to work in this case (as the loaded library may
use some API functions that are no longer present in the binary file),
but the solution with the duplicate interpreter should work as long
as: (1) it's the same version, (2) the internal markers are in sync
with the static interpreter (things like `luaO_nilobject` and
`dummynode`, anything else? maybe &version?), and (3) the multi-VM
check is disabled in the DLL (as it relies on &version comparison). If
anyone already tried something similar (or has a better solution), I'd
be very interested to see the results.