Make MicroBlaze support DWARF EH (old Xilinx patch, needed for glibc build).
[official-gcc.git] / libsanitizer / asan / asan_preinit.cc
blob6cb115bd3690e088a271649d9b01ee8734f1d2cb
1 //===-- asan_preinit.cc ---------------------------------------------------===//
2 //
3 // This file is distributed under the University of Illinois Open Source
4 // License. See LICENSE.TXT for details.
5 //
6 //===----------------------------------------------------------------------===//
7 //
8 // This file is a part of AddressSanitizer, an address sanity checker.
9 //
10 // Call __asan_init at the very early stage of process startup.
11 //===----------------------------------------------------------------------===//
12 #include "asan_internal.h"
14 using namespace __asan;
16 #if SANITIZER_CAN_USE_PREINIT_ARRAY
17 // The symbol is called __local_asan_preinit, because it's not intended to be
18 // exported.
19 // This code linked into the main executable when -fsanitize=address is in
20 // the link flags. It can only use exported interface functions.
21 __attribute__((section(".preinit_array"), used))
22 void (*__local_asan_preinit)(void) = __asan_init;
23 #endif