Path: blob/main/contrib/llvm-project/compiler-rt/lib/tsan/rtl/tsan_preinit.cpp
35294 views
//===-- tsan_preinit.cpp --------------------------------------------------===//1//2// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.3// See https://llvm.org/LICENSE.txt for license information.4// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception5//6//===----------------------------------------------------------------------===//7//8// This file is a part of ThreadSanitizer.9//10// Call __tsan_init at the very early stage of process startup.11//===----------------------------------------------------------------------===//1213#include "sanitizer_common/sanitizer_internal_defs.h"14#include "tsan_interface.h"1516#if SANITIZER_CAN_USE_PREINIT_ARRAY1718// This section is linked into the main executable when -fsanitize=thread is19// specified to perform initialization at a very early stage.20__attribute__((section(".preinit_array"), used)) static auto preinit =21__tsan_init;2223#endif242526