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