[compiler-rt] r297763 - After rL297370 and rL297383, instead of a platform check, explicitly

Dimitry Andric via llvm-commits llvm-commits at lists.llvm.org
Tue Mar 14 11:18:15 PDT 2017


Author: dim
Date: Tue Mar 14 13:18:14 2017
New Revision: 297763

URL: http://llvm.org/viewvc/llvm-project?rev=297763&view=rev
Log:
After rL297370 and rL297383, instead of a platform check, explicitly
check for the existence of RTLD_DEEPBIND, since this constant is only
supported for glibc >= 2.3.4.  This fixes builds for FreeBSD and other
platforms that do not have RTLD_DEEPBIND.

Modified:
    compiler-rt/trunk/lib/sanitizer_common/sanitizer_linux.cc

Modified: compiler-rt/trunk/lib/sanitizer_common/sanitizer_linux.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/sanitizer_common/sanitizer_linux.cc?rev=297763&r1=297762&r2=297763&view=diff
==============================================================================
--- compiler-rt/trunk/lib/sanitizer_common/sanitizer_linux.cc (original)
+++ compiler-rt/trunk/lib/sanitizer_common/sanitizer_linux.cc Tue Mar 14 13:18:14 2017
@@ -1463,7 +1463,7 @@ void MaybeReexec() {
 void PrintModuleMap() { }
 
 void CheckNoDeepBind(const char *filename, int flag) {
-#if !SANITIZER_ANDROID
+#ifdef RTLD_DEEPBIND
   if (flag & RTLD_DEEPBIND) {
     Report(
         "You are trying to dlopen a %s shared library with RTLD_DEEPBIND flag"




More information about the llvm-commits mailing list