testsuite: arm: Use effective-target for pr68620 and pr78041 tests
[official-gcc.git] / libsanitizer / lsan / lsan_preinit.cpp
blobcd94e1e8718e642a984f9e2b93bcef32fb921fc4
1 //===-- lsan_preinit.cpp --------------------------------------------------===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
8 //
9 // This file is a part of LeakSanitizer.
11 // Call __lsan_init at the very early stage of process startup.
12 //===----------------------------------------------------------------------===//
14 #include "lsan.h"
16 #if SANITIZER_CAN_USE_PREINIT_ARRAY
17 // We force __lsan_init to be called before anyone else by placing it into
18 // .preinit_array section.
19 __attribute__((section(".preinit_array"), used))
20 void (*__local_lsan_preinit)(void) = __lsan_init;
21 #endif