37 lines · c
1//===-- interception_aix.h --------------------------------------*- C++ -*-===//2//3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.4// See https://llvm.org/LICENSE.txt for license information.5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception6//7//===----------------------------------------------------------------------===//8//9// This file is a part of AddressSanitizer, an address sanity checker.10//11// AIX-specific interception methods.12//===----------------------------------------------------------------------===//13 14#if SANITIZER_AIX15 16# if !defined(INCLUDED_FROM_INTERCEPTION_LIB)17# error \18 "interception_aix.h should be included from interception library only"19# endif20 21# ifndef INTERCEPTION_AIX_H22# define INTERCEPTION_AIX_H23 24namespace __interception {25bool InterceptFunction(const char *name, uptr *ptr_to_real, uptr func,26 uptr wrapper);27} // namespace __interception28 29# define INTERCEPT_FUNCTION_AIX(func) \30 ::__interception::InterceptFunction( \31 #func, (::__interception::uptr *)&REAL(func), \32 (::__interception::uptr) & (func), \33 (::__interception::uptr) & WRAP(func))34 35# endif // INTERCEPTION_AIX_H36#endif // SANITIZER_AIX37