diff options
author | Kostya Serebryany <kcc@google.com> | 2013-11-04 21:33:31 +0000 |
---|---|---|
committer | Kostya Serebryany <kcc@gcc.gnu.org> | 2013-11-04 21:33:31 +0000 |
commit | ef1b3fda32c08e9bd6977b96e1e619aae3e3726a (patch) | |
tree | 7cfc103c9b6b4ce7ca19d39f91509a1b68819a63 /libsanitizer/interception/interception_linux.h | |
parent | fd5564d3c71195714c28ba150de7e9b90bf9c83d (diff) | |
download | gcc-ef1b3fda32c08e9bd6977b96e1e619aae3e3726a.zip gcc-ef1b3fda32c08e9bd6977b96e1e619aae3e3726a.tar.gz gcc-ef1b3fda32c08e9bd6977b96e1e619aae3e3726a.tar.bz2 |
libsanitizer merge from upstream r191666
This may break gcc-asan on Mac, will follow up separately.
From-SVN: r204368
Diffstat (limited to 'libsanitizer/interception/interception_linux.h')
-rw-r--r-- | libsanitizer/interception/interception_linux.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/libsanitizer/interception/interception_linux.h b/libsanitizer/interception/interception_linux.h index 7940ef2..fbbfecb 100644 --- a/libsanitizer/interception/interception_linux.h +++ b/libsanitizer/interception/interception_linux.h @@ -23,6 +23,7 @@ namespace __interception { // returns true if a function with the given name was found. bool GetRealFunctionAddress(const char *func_name, uptr *func_addr, uptr real, uptr wrapper); +void *GetFuncAddrVer(const char *func_name, const char *ver); } // namespace __interception #define INTERCEPT_FUNCTION_LINUX(func) \ @@ -31,5 +32,11 @@ bool GetRealFunctionAddress(const char *func_name, uptr *func_addr, (::__interception::uptr)&(func), \ (::__interception::uptr)&WRAP(func)) +#if !defined(__ANDROID__) // android does not have dlvsym +#define INTERCEPT_FUNCTION_VER(func, symver) \ + ::__interception::real_##func = (func##_f)(unsigned long) \ + ::__interception::GetFuncAddrVer(#func, #symver) +#endif // !defined(__ANDROID__) + #endif // INTERCEPTION_LINUX_H #endif // __linux__ |