Home | History | Annotate | Line # | Download | only in asan
      1  1.1  mrg //===-- asan_win_weak_interception.cpp ------------------------------------===//
      2  1.1  mrg //
      3  1.1  mrg // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
      4  1.1  mrg // See https://llvm.org/LICENSE.txt for license information.
      5  1.1  mrg // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
      6  1.1  mrg //
      7  1.1  mrg //===----------------------------------------------------------------------===//
      8  1.1  mrg // This module should be included in Address Sanitizer when it is implemented as
      9  1.1  mrg // a shared library on Windows (dll), in order to delegate the calls of weak
     10  1.1  mrg // functions to the implementation in the main executable when a strong
     11  1.1  mrg // definition is provided.
     12  1.1  mrg //===----------------------------------------------------------------------===//
     13  1.1  mrg #ifdef SANITIZER_DYNAMIC
     14  1.1  mrg #include "sanitizer_common/sanitizer_win_weak_interception.h"
     15  1.1  mrg #include "asan_interface_internal.h"
     16  1.1  mrg // Check if strong definitions for weak functions are present in the main
     17  1.1  mrg // executable. If that is the case, override dll functions to point to strong
     18  1.1  mrg // implementations.
     19  1.1  mrg #define INTERFACE_FUNCTION(Name)
     20  1.1  mrg #define INTERFACE_WEAK_FUNCTION(Name) INTERCEPT_SANITIZER_WEAK_FUNCTION(Name)
     21  1.1  mrg #include "asan_interface.inc"
     22  1.1  mrg #endif // SANITIZER_DYNAMIC
     23