diff options
author | Dmitry Vyukov <dvyukov@google.com> | 2013-09-03 07:53:49 +0000 |
---|---|---|
committer | Dmitry Vyukov <dvyukov@google.com> | 2013-09-03 07:53:49 +0000 |
commit | 2f913eef5770968386515855529e9b6244df1247 (patch) | |
tree | 4380556611251c67133a67ea5fa71ce00d7d00f3 | |
parent | f061554e8bbfad5e29dcd9e81feb725b75869fa0 (diff) |
asan: fix android build
android does not have dlvsym
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@189781 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | lib/interception/interception_linux.cc | 2 | ||||
-rw-r--r-- | lib/interception/interception_linux.h | 2 |
2 files changed, 4 insertions, 0 deletions
diff --git a/lib/interception/interception_linux.cc b/lib/interception/interception_linux.cc index 67caca32c..53f428810 100644 --- a/lib/interception/interception_linux.cc +++ b/lib/interception/interception_linux.cc @@ -24,9 +24,11 @@ bool GetRealFunctionAddress(const char *func_name, uptr *func_addr, return real == wrapper; } +#if !defined(__ANDROID__) // android does not have dlvsym void *GetFuncAddrVer(const char *func_name, const char *ver) { return dlvsym(RTLD_NEXT, func_name, ver); } +#endif // !defined(__ANDROID__) } // namespace __interception diff --git a/lib/interception/interception_linux.h b/lib/interception/interception_linux.h index 200a9ae7d..4c6f97a9d 100644 --- a/lib/interception/interception_linux.h +++ b/lib/interception/interception_linux.h @@ -34,10 +34,12 @@ void *GetFuncAddrVer(const char *func_name, const char *ver); (::__interception::uptr)&(func), \ (::__interception::uptr)&WRAP(func)) +#if !defined(__ANDROID__) // android does not have dlvsym #define INTERCEPT_FUNCTION_VER(func, funcver, symver) \ __asm__(".symver "#funcver","#func"@"#symver); \ ::__interception::real_##funcver = (funcver##_f)(unsigned long) \ ::__interception::GetFuncAddrVer(#func, #symver) +#endif // !defined(__ANDROID__) #endif // INTERCEPTION_LINUX_H #endif // __linux__ |