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