diff options
author | Kostya Serebryany <kcc@google.com> | 2013-12-05 09:18:38 +0000 |
---|---|---|
committer | Kostya Serebryany <kcc@gcc.gnu.org> | 2013-12-05 09:18:38 +0000 |
commit | df77f0e4ec043bc4fa155efbd5c1c74ce73d2b50 (patch) | |
tree | 20d85354103063e38b162a6a90b7ae51fb4b6104 /libsanitizer/interception | |
parent | 649d196dbd78a119786f204d36b7c5d4dcb3a949 (diff) | |
download | gcc-df77f0e4ec043bc4fa155efbd5c1c74ce73d2b50.zip gcc-df77f0e4ec043bc4fa155efbd5c1c74ce73d2b50.tar.gz gcc-df77f0e4ec043bc4fa155efbd5c1c74ce73d2b50.tar.bz2 |
libsanitizer merge from upstream r196090
From-SVN: r205695
Diffstat (limited to 'libsanitizer/interception')
-rw-r--r-- | libsanitizer/interception/interception.h | 6 | ||||
-rw-r--r-- | libsanitizer/interception/interception_linux.h | 9 | ||||
-rw-r--r-- | libsanitizer/interception/interception_mac.h | 1 | ||||
-rw-r--r-- | libsanitizer/interception/interception_win.h | 3 |
4 files changed, 16 insertions, 3 deletions
diff --git a/libsanitizer/interception/interception.h b/libsanitizer/interception/interception.h index 71740c5..7393f4c 100644 --- a/libsanitizer/interception/interception.h +++ b/libsanitizer/interception/interception.h @@ -236,12 +236,18 @@ typedef unsigned long uptr; // NOLINT #if defined(__linux__) # include "interception_linux.h" # define INTERCEPT_FUNCTION(func) INTERCEPT_FUNCTION_LINUX(func) +# define INTERCEPT_FUNCTION_VER(func, symver) \ + INTERCEPT_FUNCTION_VER_LINUX(func, symver) #elif defined(__APPLE__) # include "interception_mac.h" # define INTERCEPT_FUNCTION(func) INTERCEPT_FUNCTION_MAC(func) +# define INTERCEPT_FUNCTION_VER(func, symver) \ + INTERCEPT_FUNCTION_VER_MAC(func, symver) #else // defined(_WIN32) # include "interception_win.h" # define INTERCEPT_FUNCTION(func) INTERCEPT_FUNCTION_WIN(func) +# define INTERCEPT_FUNCTION_VER(func, symver) \ + INTERCEPT_FUNCTION_VER_WIN(func, symver) #endif #undef INCLUDED_FROM_INTERCEPTION_LIB diff --git a/libsanitizer/interception/interception_linux.h b/libsanitizer/interception/interception_linux.h index fbbfecb..5ab24db 100644 --- a/libsanitizer/interception/interception_linux.h +++ b/libsanitizer/interception/interception_linux.h @@ -33,9 +33,12 @@ void *GetFuncAddrVer(const char *func_name, const char *ver); (::__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) +# define INTERCEPT_FUNCTION_VER_LINUX(func, symver) \ + ::__interception::real_##func = (func##_f)(unsigned long) \ + ::__interception::GetFuncAddrVer(#func, symver) +#else +# define INTERCEPT_FUNCTION_VER_LINUX(func, symver) \ + INTERCEPT_FUNCTION_LINUX(func) #endif // !defined(__ANDROID__) #endif // INTERCEPTION_LINUX_H diff --git a/libsanitizer/interception/interception_mac.h b/libsanitizer/interception/interception_mac.h index 1b11182..fbcb473 100644 --- a/libsanitizer/interception/interception_mac.h +++ b/libsanitizer/interception/interception_mac.h @@ -20,6 +20,7 @@ #define INTERCEPTION_MAC_H #define INTERCEPT_FUNCTION_MAC(func) +#define INTERCEPT_FUNCTION_VER_MAC(func, symver) #endif // INTERCEPTION_MAC_H #endif // __APPLE__ diff --git a/libsanitizer/interception/interception_win.h b/libsanitizer/interception/interception_win.h index ebac168..b46ad0d 100644 --- a/libsanitizer/interception/interception_win.h +++ b/libsanitizer/interception/interception_win.h @@ -39,5 +39,8 @@ bool OverrideFunction(uptr old_func, uptr new_func, uptr *orig_old_func); (::__interception::uptr*)&REAL(func)) #endif +#define INTERCEPT_FUNCTION_VER_WIN(func, symver) \ + INTERCEPT_FUNCTION_WIN(func) + #endif // INTERCEPTION_WIN_H #endif // _WIN32 |