[compiler-rt] r189788 - tsan: fix linking when -ltsan is passed before -lpthread

Dmitry Vyukov dvyukov at google.com
Tue Sep 3 03:16:44 PDT 2013


Author: dvyukov
Date: Tue Sep  3 05:16:44 2013
New Revision: 189788

URL: http://llvm.org/viewvc/llvm-project?rev=189788&view=rev
Log:
tsan: fix linking when -ltsan is passed before -lpthread
libpthread is weird:
/lib/x86_64-linux-gnu/libpthread.so.0:000000000000b9b0 T pthread_cond_init@@GLIBC_2.3.2
/lib/x86_64-linux-gnu/libpthread.so.0:000000000000c720 T pthread_cond_init at GLIBC_2.2.5
let's do it with @@ for now
we can always introduce more macros parameters later


Modified:
    compiler-rt/trunk/lib/interception/interception_linux.h

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=189788&r1=189787&r2=189788&view=diff
==============================================================================
--- compiler-rt/trunk/lib/interception/interception_linux.h (original)
+++ compiler-rt/trunk/lib/interception/interception_linux.h Tue Sep  3 05:16:44 2013
@@ -36,7 +36,7 @@ void *GetFuncAddrVer(const char *func_na
 
 #if !defined(__ANDROID__)  // android does not have dlvsym
 #define INTERCEPT_FUNCTION_VER(func, funcver, symver) \
-    __asm__(".symver "#funcver","#func"@"#symver); \
+    __asm__(".symver "#funcver","#func"@@"#symver); \
     ::__interception::real_##funcver = (funcver##_f)(unsigned long) \
         ::__interception::GetFuncAddrVer(#func, #symver)
 #endif  // !defined(__ANDROID__)





More information about the llvm-commits mailing list