Retro68/gcc/libsanitizer/lsan/lsan_preinit.cc

21 lines
746 B
C++
Raw Normal View History

2014-09-21 17:33:12 +00:00
//===-- lsan_preinit.cc ---------------------------------------------------===//
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
//
// This file is a part of LeakSanitizer.
//
// Call __lsan_init at the very early stage of process startup.
//===----------------------------------------------------------------------===//
#include "lsan.h"
2015-08-28 15:33:40 +00:00
#if SANITIZER_CAN_USE_PREINIT_ARRAY
2014-09-21 17:33:12 +00:00
// We force __lsan_init to be called before anyone else by placing it into
// .preinit_array section.
__attribute__((section(".preinit_array"), used))
void (*__local_lsan_preinit)(void) = __lsan_init;
#endif