brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.6 KiB · 159cc15 Raw
38 lines · c
1//===-- asan_win_common_runtime_thunk.h -------------------------*- C++ -*-===//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-exception6//7//===----------------------------------------------------------------------===//8//9// This file is a part of AddressSanitizer, an address sanity checker.10//11// This file defines things that need to be present in the application modules12// to interact with the ASan DLL runtime correctly and can't be implemented13// using the default "import library" generated when linking the DLL.14//15//===----------------------------------------------------------------------===//16 17#if defined(SANITIZER_STATIC_RUNTIME_THUNK) || \18    defined(SANITIZER_DYNAMIC_RUNTIME_THUNK)19#  include "sanitizer_common/sanitizer_win_defs.h"20 21#  pragma section(".CRT$XIB", long, \22                  read)  // C initializer (during C init before dyninit)23#  pragma section(".CRT$XID", long, \24                  read)  // First C initializer after CRT initializers25#  pragma section(".CRT$XCAB", long, \26                  read)  // First C++ initializer after startup initializers27 28#  pragma section(".CRT$XTW", long, read)  // First ASAN globals terminator29#  pragma section(".CRT$XTY", long, read)  // Last ASAN globals terminator30 31#  pragma section(".CRT$XLAB", long, read)  // First TLS initializer32 33#  ifdef SANITIZER_STATIC_RUNTIME_THUNK34extern "C" void __asan_initialize_static_thunk();35#  endif36 37#endif  // defined(SANITIZER_STATIC_RUNTIME_THUNK) ||38        // defined(SANITIZER_DYNAMIC_RUNTIME_THUNK)