OsdepDynload - larcenists/larceny GitHub Wiki
Here are some notes on how different Operating Systems behave with respect to osdep_dlopen and osdep_dlsym.
PnkFelix is curious about getting pointers to functions that are linked into the executable. For example, just grabbing malloc or free, which is easy on Linux and Mac OS X, but may be harder on Solaris and Win32.
Back in 10/23/06, Jesse and PnkFelix did some experiments on this (changeset:3694).
- Felix's notes from that time period indicate that Solaris does not support
dlsym(0, ---), but Solaris can express what we want viadlopen( 0, LDFLAGS )which returns an appropriate handle.- (That is, Solaris
dlsym(dlopen(0, LDFLAGS), ---)= Linuxdlsym(0, ---))
- (That is, Solaris
On Win32, there is call GetModuleHandle(NULL) that retrieves a reference to the current module, which may be passed to GetProcAddress.