[compiler-rt] r182567 - [ASan] Rename __asan_preinit to __local_asan_preinit to avoid warnings from the linker which is trying to export all the __asan_* symbols
Alexander Potapenko
glider at google.com
Thu May 23 02:15:21 PDT 2013
Author: glider
Date: Thu May 23 04:15:20 2013
New Revision: 182567
URL: http://llvm.org/viewvc/llvm-project?rev=182567&view=rev
Log:
[ASan] Rename __asan_preinit to __local_asan_preinit to avoid warnings from the linker which is trying to export all the __asan_* symbols
Modified:
compiler-rt/trunk/lib/asan/asan_preinit.cc
Modified: compiler-rt/trunk/lib/asan/asan_preinit.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/asan/asan_preinit.cc?rev=182567&r1=182566&r2=182567&view=diff
==============================================================================
--- compiler-rt/trunk/lib/asan/asan_preinit.cc (original)
+++ compiler-rt/trunk/lib/asan/asan_preinit.cc Thu May 23 04:15:20 2013
@@ -18,8 +18,10 @@
// On Linux, we force __asan_init to be called before anyone else
// by placing it into .preinit_array section.
// FIXME: do we have anything like this on Mac?
+ // The symbol is called __local_asan_preinit, because it's not intended to be
+ // exported.
__attribute__((section(".preinit_array"), used))
- void (*__asan_preinit)(void) =__asan_init;
+ void (*__local_asan_preinit)(void) = __asan_init;
#elif SANITIZER_WINDOWS && defined(_DLL)
// On Windows, when using dynamic CRT (/MD), we can put a pointer
// to __asan_init into the global list of C initializers.
More information about the llvm-commits
mailing list