111
|
1 //===-- ubsan_win_weak_interception.cc ------------------------------------===//
|
|
2 //
|
|
3 // This file is distributed under the University of Illinois Open Source
|
|
4 // License. See LICENSE.TXT for details.
|
|
5 //
|
|
6 //===----------------------------------------------------------------------===//
|
|
7 // This module should be included in Ubsan when it is implemented as a shared
|
|
8 // library on Windows (dll), in order to delegate the calls of weak functions to
|
|
9 // the implementation in the main executable when a strong definition is
|
|
10 // provided.
|
|
11 //===----------------------------------------------------------------------===//
|
|
12 #ifdef SANITIZER_DYNAMIC
|
|
13 #include "sanitizer_common/sanitizer_win_weak_interception.h"
|
|
14 #include "ubsan_flags.h"
|
|
15 // Check if strong definitions for weak functions are present in the main
|
|
16 // executable. If that is the case, override dll functions to point to strong
|
|
17 // implementations.
|
|
18 #define INTERFACE_FUNCTION(Name)
|
|
19 #define INTERFACE_WEAK_FUNCTION(Name) INTERCEPT_SANITIZER_WEAK_FUNCTION(Name)
|
|
20 #include "ubsan_interface.inc"
|
|
21 #endif // SANITIZER_DYNAMIC
|