Add hppa*-*-* to dg-error targets at line 5
[official-gcc.git] / libsanitizer / tsan / tsan_preinit.cpp
blob205bdbf93b20136286cb5e3ae0f22df0ae4d004c
1 //===-- tsan_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 ThreadSanitizer.
11 // Call __tsan_init at the very early stage of process startup.
12 //===----------------------------------------------------------------------===//
14 #include "sanitizer_common/sanitizer_internal_defs.h"
15 #include "tsan_interface.h"
17 #if SANITIZER_CAN_USE_PREINIT_ARRAY
19 // The symbol is called __local_tsan_preinit, because it's not intended to be
20 // exported.
21 // This code linked into the main executable when -fsanitize=thread is in
22 // the link flags. It can only use exported interface functions.
23 __attribute__((section(".preinit_array"), used))
24 void (*__local_tsan_preinit)(void) = __tsan_init;
26 #endif