summaryrefslogtreecommitdiff
path: root/lib/lsan/lsan_preinit.cc
diff options
context:
space:
mode:
authorAlexey Samsonov <vonosmas@gmail.com>2014-07-25 22:05:02 +0000
committerAlexey Samsonov <vonosmas@gmail.com>2014-07-25 22:05:02 +0000
commit9da797cf61f0ace678c3a985d19c21fe0b86f0ce (patch)
tree046bdc85af97d3c3a284324a4628f917f50e762b /lib/lsan/lsan_preinit.cc
parent0f321637cede2fac93629caecdbb8550f8c814b1 (diff)
[Sanitizer] Introduce SANITIZER_CAN_USE_PREINIT_ARRAY definition and use it across sanitizers.
Get rid of ASAN_USE_PREINIT_ARRAY and LSAN_USE_PREINIT_ARRAY - just always use .preinit_array if it's available. This mode seems stable enough, and we've been relying on default values of these macro for a long time. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@213980 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/lsan/lsan_preinit.cc')
-rw-r--r--lib/lsan/lsan_preinit.cc6
1 files changed, 1 insertions, 5 deletions
diff --git a/lib/lsan/lsan_preinit.cc b/lib/lsan/lsan_preinit.cc
index e6639516d..5a190959c 100644
--- a/lib/lsan/lsan_preinit.cc
+++ b/lib/lsan/lsan_preinit.cc
@@ -14,11 +14,7 @@
#include "lsan.h"
-#ifndef LSAN_USE_PREINIT_ARRAY
-#define LSAN_USE_PREINIT_ARRAY 1
-#endif
-
-#if LSAN_USE_PREINIT_ARRAY && !defined(PIC)
+#if SANITIZER_CAN_USE_PREINIT_ARRAY
// We force __lsan_init to be called before anyone else by placing it into
// .preinit_array section.
__attribute__((section(".preinit_array"), used))