Path: blob/main/contrib/llvm-project/compiler-rt/lib/asan/asan_init_version.h
35233 views
//===-- asan_init_version.h -------------------------------------*- C++ -*-===//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 AddressSanitizer, an address sanity checker.9//10// This header defines a versioned __asan_init function to be called at the11// startup of the instrumented program.12//===----------------------------------------------------------------------===//13#ifndef ASAN_INIT_VERSION_H14#define ASAN_INIT_VERSION_H1516#include "sanitizer_common/sanitizer_platform.h"1718extern "C" {19// Every time the ASan ABI changes we also change the version number in the20// __asan_init function name. Objects built with incompatible ASan ABI21// versions will not link with run-time.22//23// Changes between ABI versions:24// v1=>v2: added 'module_name' to __asan_global25// v2=>v3: stack frame description (created by the compiler)26// contains the function PC as the 3rd field (see27// DescribeAddressIfStack)28// v3=>v4: added '__asan_global_source_location' to __asan_global29// v4=>v5: changed the semantics and format of __asan_stack_malloc_ and30// __asan_stack_free_ functions31// v5=>v6: changed the name of the version check symbol32// v6=>v7: added 'odr_indicator' to __asan_global33// v7=>v8: added '__asan_(un)register_image_globals' functions for dead34// stripping support on Mach-O platforms35#if SANITIZER_WORDSIZE == 32 && SANITIZER_ANDROID36// v8=>v9: 32-bit Android switched to dynamic shadow37#define __asan_version_mismatch_check __asan_version_mismatch_check_v938#else39#define __asan_version_mismatch_check __asan_version_mismatch_check_v840#endif41}4243#endif // ASAN_INIT_VERSION_H444546