dlfcn.h


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 b70639dc 2015-03-11T20:12:25 Do not use dllimport in any case
Dennis Nienhüser 83432ba2 2015-03-11T20:00:11 Add import/export symbols for MSVC. This results in an import .lib file. Closes #4. Some fixes by Timothy Gu <timothygu99@gmail.com> Signed-off-by: Timothy Gu <timothygu99@gmail.com>
Timothy Gu 346543d6 2014-02-10T03:05:45 License stuff
Timothy Gu 53c31d96 2014-01-20T01:59:11 Add C++ extern "C" See Issue 8 and Issue 12.
Ramiro Polla 4c4b268c 2007-06-28T05:50:08 Initial Revision