1 //===-- asan_preinit.cc ---------------------------------------------------===//
3 // This file is distributed under the University of Illinois Open Source
4 // License. See LICENSE.TXT for details.
6 //===----------------------------------------------------------------------===//
8 // This file is a part of AddressSanitizer, an address sanity checker.
10 // Call __asan_init at the very early stage of process startup.
11 //===----------------------------------------------------------------------===//
12 #include "asan_internal.h"
14 #if SANITIZER_CAN_USE_PREINIT_ARRAY
15 // The symbol is called __local_asan_preinit, because it's not intended to be
17 __attribute__((section(".preinit_array"), used
))
18 void (*__local_asan_preinit
)(void) = __asan_init
;