1 //===-- asan_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 Address Sanitizer when it is implemented as 8 // a shared library on Windows (dll), in order to delegate the calls of weak 9 // functions to the implementation in the main executable when a strong 10 // definition is provided. 11 //===----------------------------------------------------------------------===// 12 #ifdef SANITIZER_DYNAMIC 13 #include "sanitizer_common/sanitizer_win_weak_interception.h" 14 #include "asan_interface_internal.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 "asan_interface.inc" 21 #endif // SANITIZER_DYNAMIC 22