[asan] Revert r221882.
authorEvgeniy Stepanov <eugeni.stepanov@gmail.com>
Fri, 14 Nov 2014 13:02:28 +0000 (13:02 +0000)
committerEvgeniy Stepanov <eugeni.stepanov@gmail.com>
Fri, 14 Nov 2014 13:02:28 +0000 (13:02 +0000)
This code is not part of ASan runtime (as it may be linked into a different
DSO), and thus can not call non-exported functions.

llvm-svn: 221986

compiler-rt/lib/asan/asan_preinit.cc

index ef7f89a..a3986d2 100644 (file)
@@ -18,6 +18,8 @@ using namespace __asan;
 #if SANITIZER_CAN_USE_PREINIT_ARRAY
   // The symbol is called __local_asan_preinit, because it's not intended to be
   // exported.
+  // This code linked into the main executable when -fsanitize=address is in
+  // the link flags. It can only use exported interface functions.
   __attribute__((section(".preinit_array"), used))
-  void (*__local_asan_preinit)(void) = AsanInitFromRtl;
+  void (*__local_asan_preinit)(void) = __asan_init;
 #endif