testdll.c


Log

Author Commit Date CI Message
Pali Rohár 63d7bda4 2019-01-29T22:57:04 Implement support for dlsym() with RTLD_DEFAULT and RTLD_NEXT dlsym() with RTLD_DEFAULT handle behaves in same way like with global handle returned by dlopen() with NULL file name. dlsym() with RTLD_NEXT handle search for next loaded module which provides specified symbol. "Next" means module which in EnumProcessModules() result after the module which called dlsym(). To get caller function of dlsym() use _ReturnAddress() intrinsic. To get module where is caller function use the fact that HMODULE is the same value as the module's base address. When compiling under gcc, defines _ReturnAddress() macro via gcc's builtin as it does not provide MSC's specific _ReturnAddress() intrinsic. Added tests demonstrate that both RTLD_DEFAULT and RTLD_NEXT are working as expected.
Timothy Gu c421b701 2015-03-15T16:09:44 Check for memory leak when _DEBUG is defined
Timothy Gu 4c3754da 2014-08-17T00:11:08 Fix test DLL export Fixes issue 16. Patch by Nathan Rajlich <nathan@tootallnate.net>
Timothy Gu 346543d6 2014-02-10T03:05:45 License stuff
Ramiro Polla 4c4b268c 2007-06-28T05:50:08 Initial Revision