Path: blob/main/contrib/llvm-project/compiler-rt/lib/hwasan/hwasan_preinit.cpp
35235 views
//===-- hwasan_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 HWAddressSanitizer, an address sanity checker.9//10// Call __hwasan_init at the very early stage of process startup.11//===----------------------------------------------------------------------===//12#include "hwasan_interface_internal.h"13#include "sanitizer_common/sanitizer_internal_defs.h"1415#if SANITIZER_CAN_USE_PREINIT_ARRAY16// This section is linked into the main executable when -fsanitize=hwaddress is17// specified to perform initialization at a very early stage.18__attribute__((section(".preinit_array"), used)) static auto preinit =19__hwasan_init;20#endif212223