1 //===-- interception_linux.h ------------------------------------*- C++ -*-===//
3 // This file is distributed under the University of Illinois Open Source
4 // License. See LICENSE.TXT for details.
6 //===----------------------------------------------------------------------===//
8 // This file is a part of AddressSanitizer, an address sanity checker.
10 // Linux-specific interception methods.
11 //===----------------------------------------------------------------------===//
15 #if !defined(INCLUDED_FROM_INTERCEPTION_LIB)
16 # error "interception_linux.h should be included from interception library only"
19 #ifndef INTERCEPTION_LINUX_H
20 #define INTERCEPTION_LINUX_H
22 namespace __interception
{
23 // returns true if a function with the given name was found.
24 bool GetRealFunctionAddress(const char *func_name
, uptr
*func_addr
,
25 uptr real
, uptr wrapper
);
26 } // namespace __interception
28 #define INTERCEPT_FUNCTION_LINUX(func) \
29 ::__interception::GetRealFunctionAddress( \
30 #func, (::__interception::uptr*)&REAL(func), \
31 (::__interception::uptr)&(func), \
32 (::__interception::uptr)&WRAP(func))
34 #endif // INTERCEPTION_LINUX_H