2014-09-23 19:59:53 +02:00
|
|
|
//===-- asan_init_version.h -------------------------------------*- C++ -*-===//
|
|
|
|
//
|
2019-08-14 10:47:11 +02:00
|
|
|
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
|
|
|
|
// See https://llvm.org/LICENSE.txt for license information.
|
|
|
|
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
2014-09-23 19:59:53 +02:00
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
//
|
|
|
|
// This file is a part of AddressSanitizer, an address sanity checker.
|
|
|
|
//
|
|
|
|
// This header defines a versioned __asan_init function to be called at the
|
|
|
|
// startup of the instrumented program.
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
#ifndef ASAN_INIT_VERSION_H
|
|
|
|
#define ASAN_INIT_VERSION_H
|
|
|
|
|
2018-10-31 12:14:23 +01:00
|
|
|
#include "sanitizer_common/sanitizer_platform.h"
|
|
|
|
|
2014-09-23 19:59:53 +02:00
|
|
|
extern "C" {
|
|
|
|
// Every time the ASan ABI changes we also change the version number in the
|
|
|
|
// __asan_init function name. Objects built with incompatible ASan ABI
|
|
|
|
// versions will not link with run-time.
|
2016-11-08 23:04:09 +01:00
|
|
|
//
|
2014-09-23 19:59:53 +02:00
|
|
|
// Changes between ABI versions:
|
|
|
|
// v1=>v2: added 'module_name' to __asan_global
|
|
|
|
// v2=>v3: stack frame description (created by the compiler)
|
2016-11-08 23:04:09 +01:00
|
|
|
// contains the function PC as the 3rd field (see
|
|
|
|
// DescribeAddressIfStack)
|
|
|
|
// v3=>v4: added '__asan_global_source_location' to __asan_global
|
2015-10-21 09:32:45 +02:00
|
|
|
// v4=>v5: changed the semantics and format of __asan_stack_malloc_ and
|
2016-11-08 23:04:09 +01:00
|
|
|
// __asan_stack_free_ functions
|
2015-10-21 09:32:45 +02:00
|
|
|
// v5=>v6: changed the name of the version check symbol
|
2016-11-08 23:04:09 +01:00
|
|
|
// v6=>v7: added 'odr_indicator' to __asan_global
|
|
|
|
// v7=>v8: added '__asan_(un)register_image_globals' functions for dead
|
|
|
|
// stripping support on Mach-O platforms
|
2018-10-31 12:14:23 +01:00
|
|
|
#if SANITIZER_WORDSIZE == 32 && SANITIZER_ANDROID
|
|
|
|
// v8=>v9: 32-bit Android switched to dynamic shadow
|
|
|
|
#define __asan_version_mismatch_check __asan_version_mismatch_check_v9
|
|
|
|
#else
|
2016-11-08 23:04:09 +01:00
|
|
|
#define __asan_version_mismatch_check __asan_version_mismatch_check_v8
|
2018-10-31 12:14:23 +01:00
|
|
|
#endif
|
2014-09-23 19:59:53 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
#endif // ASAN_INIT_VERSION_H
|