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