[compiler-rt] r185077 - tsan: remove non-existent functions from syms file

Dmitry Vyukov dvyukov at google.com
Thu Jun 27 06:52:51 PDT 2013


Author: dvyukov
Date: Thu Jun 27 08:52:50 2013
New Revision: 185077

URL: http://llvm.org/viewvc/llvm-project?rev=185077&view=rev
Log:
tsan: remove non-existent functions from syms file

Modified:
    compiler-rt/trunk/lib/tsan/gen_dynamic_list.sh
    compiler-rt/trunk/lib/tsan/rtl/tsan.syms

Modified: compiler-rt/trunk/lib/tsan/gen_dynamic_list.sh
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/tsan/gen_dynamic_list.sh?rev=185077&r1=185076&r2=185077&view=diff
==============================================================================
--- compiler-rt/trunk/lib/tsan/gen_dynamic_list.sh (original)
+++ compiler-rt/trunk/lib/tsan/gen_dynamic_list.sh Thu Jun 27 08:52:50 2013
@@ -1,6 +1,7 @@
 #!/bin/bash
 set -e
 
+# Collect interceptor names from a source file.
 function collect() {
   while read line ; do
     if [[ $line =~ ^(.*)((TSAN_INTERCEPT|INTERCEPT_FUNCTION)\()([a-z,A-Z,0-9,_]+)(.*)$ ]] ; then
@@ -10,6 +11,7 @@ function collect() {
   done < "$1"
 }
 
+# Interface functions.
 results+=" __tsan_init"
 results+=" __tsan_read*"
 results+=" __tsan_write*"
@@ -40,8 +42,15 @@ collect ../sanitizer_common/sanitizer_co
 results=`for i in $results; do echo $i; done | sort -f`
 echo "# AUTO GENERATED by compiler-rt/lib/tsan/gen_dynamic_list.sh; EDITING IS FUTILE."
 echo "{"
+NM=`nm rtl/libtsan.a`
 for i in $results; do
-  echo "  $i;"
+  # Remove symbols that are not present in the library.
+  if [[ $NM =~ " $i" ]]; then
+    echo "  $i;"
+  else if [[ $i == *"*" ]]; then
+    echo "  $i;"
+  fi
+  fi
 done
 echo "};"
 

Modified: compiler-rt/trunk/lib/tsan/rtl/tsan.syms
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/tsan/rtl/tsan.syms?rev=185077&r1=185076&r2=185077&view=diff
==============================================================================
--- compiler-rt/trunk/lib/tsan/rtl/tsan.syms (original)
+++ compiler-rt/trunk/lib/tsan/rtl/tsan.syms Thu Jun 27 08:52:50 2013
@@ -32,18 +32,13 @@
   frexpl;
   fstat;
   fstat64;
-  func;
   fwrite;
-  getaddrinfo;
-  getgrgid;
-  getgrgid_r;
   gethostbyname2;
   gethostbyname2_r;
   getpeername;
   getsockname;
   getsockopt;
   gettimeofday;
-  glob64;
   inet_aton;
   inet_pton;
   inotify_init;
@@ -89,7 +84,6 @@
   pthread_barrier_wait;
   pthread_cond_broadcast;
   pthread_cond_destroy;
-  pthread_cond_init;
   pthread_cond_signal;
   pthread_cond_timedwait;
   pthread_cond_wait;
@@ -218,18 +212,13 @@
   __interceptor_frexpl;
   __interceptor_fstat;
   __interceptor_fstat64;
-  __interceptor_func;
   __interceptor_fwrite;
-  __interceptor_getaddrinfo;
-  __interceptor_getgrgid;
-  __interceptor_getgrgid_r;
   __interceptor_gethostbyname2;
   __interceptor_gethostbyname2_r;
   __interceptor_getpeername;
   __interceptor_getsockname;
   __interceptor_getsockopt;
   __interceptor_gettimeofday;
-  __interceptor_glob64;
   __interceptor_inet_aton;
   __interceptor_inet_pton;
   __interceptor_inotify_init;
@@ -275,7 +264,6 @@
   __interceptor_pthread_barrier_wait;
   __interceptor_pthread_cond_broadcast;
   __interceptor_pthread_cond_destroy;
-  __interceptor_pthread_cond_init;
   __interceptor_pthread_cond_signal;
   __interceptor_pthread_cond_timedwait;
   __interceptor_pthread_cond_wait;





More information about the llvm-commits mailing list