1 /* 2 * Copyright 2012, The Android Open Source Project 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 17 #ifndef _ASM_PORTABILITY_H_ 18 #define _ASM_PORTABILITY_H_ 19 20 #if !defined(__HOST__) 21 #define WRAP(f) f ## _portable 22 #define REAL(f) f 23 #else 24 /* On host app link with libpportable.a with -Wl,--wrap=symbol, which resolves undefined symbol to __wrap_symbol, 25 * and undefined __real_symbol to the original symbol 26 */ 27 #define WRAP(f) __wrap_ ## f 28 #define REAL(f) __real_ ## f 29 #endif 30 31 #if defined(__mips__) && !defined(END) 32 #define END(f) .cfi_endproc; .end f 33 #endif 34 35 #endif /* _ASM_PORTABILITY_H_ */ 36