Add support for Mac OS X to ResolveSymbol() and FindPattern() in IMemUtils (bug 4392, r=dvander).

This commit is contained in:
Scott Ehlert
2010-05-13 04:20:41 -05:00
parent 31f223bff5
commit 5ef40e15c4
3 changed files with 214 additions and 27 deletions
+6 -3
View File
@@ -67,11 +67,14 @@ namespace SourceMod
/**
* @brief Retrieves a symbol pointer from a dynamic library.
*
* Note: On Linux, this function is able to resolve symbols that are hidden via GCC's
* -fvisibility=hidden option.
* Note: On Linux and Mac OS X, this function is able to resolve symbols that are hidden
* via GCC's -fvisibility=hidden option.
*
* Note: On Mac OS X, the symbol name should be passed without the prepended underscore,
* as this is how dlsym() would expect it.
*
* @param handle Operating system specific handle that points to dynamic library.
* This comes from dlopen() on Linux or LoadLibrary() on Windows.
* This comes from dlopen() on Linux/OS X or LoadLibrary() on Windows.
* @param symbol Symbol name.
* @return Symbol pointer, or NULL if not found.
*/