[compiler-rt] r189781 - asan: fix android build
Dmitry Vyukov
dvyukov at google.com
Tue Sep 3 00:53:49 PDT 2013
Author: dvyukov
Date: Tue Sep 3 02:53:49 2013
New Revision: 189781
URL: http://llvm.org/viewvc/llvm-project?rev=189781&view=rev
Log:
asan: fix android build
android does not have dlvsym
Modified:
compiler-rt/trunk/lib/interception/interception_linux.cc
compiler-rt/trunk/lib/interception/interception_linux.h
Modified: compiler-rt/trunk/lib/interception/interception_linux.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/interception/interception_linux.cc?rev=189781&r1=189780&r2=189781&view=diff
==============================================================================
--- compiler-rt/trunk/lib/interception/interception_linux.cc (original)
+++ compiler-rt/trunk/lib/interception/interception_linux.cc Tue Sep 3 02:53:49 2013
@@ -24,9 +24,11 @@ bool GetRealFunctionAddress(const char *
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
Modified: compiler-rt/trunk/lib/interception/interception_linux.h
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/interception/interception_linux.h?rev=189781&r1=189780&r2=189781&view=diff
==============================================================================
--- compiler-rt/trunk/lib/interception/interception_linux.h (original)
+++ compiler-rt/trunk/lib/interception/interception_linux.h Tue Sep 3 02:53:49 2013
@@ -34,10 +34,12 @@ void *GetFuncAddrVer(const char *func_na
(::__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__
More information about the llvm-commits
mailing list