annotate libsanitizer/asan/asan_init_version.h @ 158:494b0b89df80 default tip

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