Path: blob/main/contrib/llvm-project/compiler-rt/lib/lsan/lsan_preinit.cpp
35233 views
//===-- lsan_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 LeakSanitizer.9//10// Call __lsan_init at the very early stage of process startup.11//===----------------------------------------------------------------------===//1213#include "lsan.h"1415#if SANITIZER_CAN_USE_PREINIT_ARRAY16// This section is linked into the main executable when -fsanitize=leak is17// specified to perform initialization at a very early stage.18__attribute__((section(".preinit_array"), used)) static auto preinit =19__lsan_init;20#endif212223