diff options
author | Alexander Potapenko <glider@google.com> | 2013-05-23 09:15:20 +0000 |
---|---|---|
committer | Alexander Potapenko <glider@google.com> | 2013-05-23 09:15:20 +0000 |
commit | a7e8c97e8af9e375ea37cf03a3da0cd645d95d6a (patch) | |
tree | 4c77da4dedac13dfcf0f03c03c934afc0e2d1346 /lib/asan/asan_preinit.cc | |
parent | d06f2fc03087e7cccda19bd550bf6fb3bc2f5ae7 (diff) |
[ASan] Rename __asan_preinit to __local_asan_preinit to avoid warnings from the linker which is trying to export all the __asan_* symbols
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@182567 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/asan/asan_preinit.cc')
-rw-r--r-- | lib/asan/asan_preinit.cc | 4 |
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. |