diff --git a/compiler-rt/lib/asan/asan_preinit.cc b/compiler-rt/lib/asan/asan_preinit.cc index 9de963ccc037fbd77e13d0f7eb18296010e7574f..586f551c23c323ac033d2510c089a49adb0a84aa 100644 --- a/compiler-rt/lib/asan/asan_preinit.cc +++ b/compiler-rt/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.