1 1.1 mrg //===-- asan_init_version.h -------------------------------------*- C++ -*-===// 2 1.1 mrg // 3 1.3 mrg // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 4 1.3 mrg // See https://llvm.org/LICENSE.txt for license information. 5 1.3 mrg // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 6 1.1 mrg // 7 1.1 mrg //===----------------------------------------------------------------------===// 8 1.1 mrg // 9 1.1 mrg // This file is a part of AddressSanitizer, an address sanity checker. 10 1.1 mrg // 11 1.1 mrg // This header defines a versioned __asan_init function to be called at the 12 1.1 mrg // startup of the instrumented program. 13 1.1 mrg //===----------------------------------------------------------------------===// 14 1.1 mrg #ifndef ASAN_INIT_VERSION_H 15 1.1 mrg #define ASAN_INIT_VERSION_H 16 1.1 mrg 17 1.2 mrg #include "sanitizer_common/sanitizer_platform.h" 18 1.2 mrg 19 1.1 mrg extern "C" { 20 1.1 mrg // Every time the ASan ABI changes we also change the version number in the 21 1.1 mrg // __asan_init function name. Objects built with incompatible ASan ABI 22 1.1 mrg // versions will not link with run-time. 23 1.2 mrg // 24 1.1 mrg // Changes between ABI versions: 25 1.1 mrg // v1=>v2: added 'module_name' to __asan_global 26 1.1 mrg // v2=>v3: stack frame description (created by the compiler) 27 1.2 mrg // contains the function PC as the 3rd field (see 28 1.2 mrg // DescribeAddressIfStack) 29 1.2 mrg // v3=>v4: added '__asan_global_source_location' to __asan_global 30 1.2 mrg // v4=>v5: changed the semantics and format of __asan_stack_malloc_ and 31 1.2 mrg // __asan_stack_free_ functions 32 1.2 mrg // v5=>v6: changed the name of the version check symbol 33 1.2 mrg // v6=>v7: added 'odr_indicator' to __asan_global 34 1.2 mrg // v7=>v8: added '__asan_(un)register_image_globals' functions for dead 35 1.2 mrg // stripping support on Mach-O platforms 36 1.2 mrg #if SANITIZER_WORDSIZE == 32 && SANITIZER_ANDROID 37 1.2 mrg // v8=>v9: 32-bit Android switched to dynamic shadow 38 1.2 mrg #define __asan_version_mismatch_check __asan_version_mismatch_check_v9 39 1.2 mrg #else 40 1.2 mrg #define __asan_version_mismatch_check __asan_version_mismatch_check_v8 41 1.2 mrg #endif 42 1.1 mrg } 43 1.1 mrg 44 1.1 mrg #endif // ASAN_INIT_VERSION_H 45