summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/asan/asan_preinit.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/asan/asan_preinit.cc b/lib/asan/asan_preinit.cc
index 9de963ccc..586f551c2 100644
--- a/lib/asan/asan_preinit.cc
+++ b/lib/asan/asan_preinit.cc
@@ -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.