summaryrefslogtreecommitdiffstats
path: root/compiler-rt/lib/interception
diff options
context:
space:
mode:
Diffstat (limited to 'compiler-rt/lib/interception')
-rw-r--r--compiler-rt/lib/interception/interception_linux.cc2
-rw-r--r--compiler-rt/lib/interception/interception_linux.h2
2 files changed, 4 insertions, 0 deletions
diff --git a/compiler-rt/lib/interception/interception_linux.cc b/compiler-rt/lib/interception/interception_linux.cc
index 67caca32cd2..53f42881016 100644
--- a/compiler-rt/lib/interception/interception_linux.cc
+++ b/compiler-rt/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/compiler-rt/lib/interception/interception_linux.h b/compiler-rt/lib/interception/interception_linux.h
index 200a9ae7d41..4c6f97a9d96 100644
--- a/compiler-rt/lib/interception/interception_linux.h
+++ b/compiler-rt/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__
OpenPOWER on IntegriCloud