Lines Matching refs:func

150 # define DECLARE_WRAPPER(ret_type, func, ...)  argument
156 # define DECLARE_WRAPPER(ret_type, func, ...) \ argument
157 extern "C" ret_type func(__VA_ARGS__);
158 # define DECLARE_WRAPPER_WINAPI(ret_type, func, ...) \ argument
159 extern "C" __declspec(dllimport) ret_type __stdcall func(__VA_ARGS__);
184 # define __ASM_WEAK_WRAPPER(func) ".globl " #func "\n" argument
186 # define __ASM_WEAK_WRAPPER(func) ".weak " #func "\n" argument
194 # define DECLARE_WRAPPER(ret_type, func, ...) \ argument
195 extern "C" ret_type func(__VA_ARGS__); \
196 extern "C" ret_type TRAMPOLINE(func)(__VA_ARGS__); \
197 extern "C" ret_type __interceptor_##func(__VA_ARGS__) \
198 INTERCEPTOR_ATTRIBUTE __attribute__((weak)) ALIAS(WRAP(func)); \
201 __ASM_WEAK_WRAPPER(func) \
202 ".set " #func ", " SANITIZER_STRINGIFY(TRAMPOLINE(func)) "\n" \
203 ".globl " SANITIZER_STRINGIFY(TRAMPOLINE(func)) "\n" \
204 ".type " SANITIZER_STRINGIFY(TRAMPOLINE(func)) ", " \
206 SANITIZER_STRINGIFY(TRAMPOLINE(func)) ":\n" \
208 C_ASM_TAIL_CALL(SANITIZER_STRINGIFY(TRAMPOLINE(func)), \
210 SANITIZER_STRINGIFY(ASM_PREEMPTIBLE_SYM(func))) "\n" \
212 ".size " SANITIZER_STRINGIFY(TRAMPOLINE(func)) ", " \
213 ".-" SANITIZER_STRINGIFY(TRAMPOLINE(func)) "\n" \
229 # define DECLARE_WRAPPER(ret_type, func, ...) \ argument
230 extern "C" ret_type func(__VA_ARGS__) \
231 INTERCEPTOR_ATTRIBUTE __ATTRIBUTE_WEAK_WRAPPER ALIAS(WRAP(func));
242 # define DECLARE_REAL(ret_type, func, ...) argument
248 # define DECLARE_REAL(ret_type, func, ...) \ argument
249 typedef ret_type (*FUNC_TYPE(func))(__VA_ARGS__); \
251 extern FUNC_TYPE(func) PTR_TO_REAL(func); \
256 # define DECLARE_REAL(ret_type, func, ...) \ argument
257 extern "C" ret_type func(__VA_ARGS__);
262 # define DECLARE_REAL_AND_INTERCEPTOR(ret_type, func, ...) \ argument
263 DECLARE_REAL(ret_type, func, __VA_ARGS__) \
264 extern "C" ret_type TRAMPOLINE(func)(__VA_ARGS__); \
265 extern "C" ret_type WRAP(func)(__VA_ARGS__);
268 # define DECLARE_EXTERN_INTERCEPTOR_AND_WRAPPER(ret_type, func, ...) \ argument
269 extern "C" ret_type TRAMPOLINE(func)(__VA_ARGS__); \
270 extern "C" ret_type WRAP(func)(__VA_ARGS__); \
271 extern "C" ret_type func(__VA_ARGS__);
273 # define DECLARE_REAL_AND_INTERCEPTOR(ret_type, func, ...) argument
274 # define DECLARE_EXTERN_INTERCEPTOR_AND_WRAPPER(ret_type, func, ...) argument
282 # define DEFINE_REAL(ret_type, func, ...) \ argument
283 typedef ret_type (*FUNC_TYPE(func))(__VA_ARGS__); \
285 FUNC_TYPE(func) PTR_TO_REAL(func); \
288 # define DEFINE_REAL(ret_type, func, ...) argument
296 #define INTERCEPTOR(ret_type, func, ...) \ argument
297 extern "C"[[ gnu::alias(#func), gnu::visibility("hidden") ]] ret_type \
298 __interceptor_##func(__VA_ARGS__); \
299 extern "C" INTERCEPTOR_ATTRIBUTE ret_type func(__VA_ARGS__)
303 #define INTERCEPTOR(ret_type, func, ...) \ argument
304 DEFINE_REAL(ret_type, func, __VA_ARGS__) \
305 DECLARE_WRAPPER(ret_type, func, __VA_ARGS__) \
306 extern "C" INTERCEPTOR_ATTRIBUTE ret_type WRAP(func)(__VA_ARGS__)
309 #define INTERCEPTOR_WITH_SUFFIX(ret_type, func, ...) \ argument
310 INTERCEPTOR(ret_type, func, __VA_ARGS__)
314 #define INTERCEPTOR_ZZZ(suffix, ret_type, func, ...) \ argument
315 extern "C" ret_type func(__VA_ARGS__) suffix; \
316 extern "C" ret_type WRAP(func)(__VA_ARGS__); \
317 INTERPOSER(func); \
318 extern "C" INTERCEPTOR_ATTRIBUTE ret_type WRAP(func)(__VA_ARGS__)
320 #define INTERCEPTOR(ret_type, func, ...) \ argument
321 INTERCEPTOR_ZZZ(/*no symbol variants*/, ret_type, func, __VA_ARGS__)
323 #define INTERCEPTOR_WITH_SUFFIX(ret_type, func, ...) \ argument
324 INTERCEPTOR_ZZZ(__DARWIN_ALIAS_C(func), ret_type, func, __VA_ARGS__)
332 # define INTERCEPTOR_WINAPI(ret_type, func, ...) \ argument
333 typedef ret_type (__stdcall *FUNC_TYPE(func))(__VA_ARGS__); \
335 FUNC_TYPE(func) PTR_TO_REAL(func); \
337 extern "C" INTERCEPTOR_ATTRIBUTE ret_type __stdcall WRAP(func)(__VA_ARGS__)
371 # define INTERCEPT_FUNCTION(func) INTERCEPT_FUNCTION_LINUX_OR_FREEBSD(func) argument
372 # define INTERCEPT_FUNCTION_VER(func, symver) \ argument
373 INTERCEPT_FUNCTION_VER_LINUX_OR_FREEBSD(func, symver)
376 # define INTERCEPT_FUNCTION(func) INTERCEPT_FUNCTION_MAC(func) argument
377 # define INTERCEPT_FUNCTION_VER(func, symver) \ argument
378 INTERCEPT_FUNCTION_VER_MAC(func, symver)
381 # define INTERCEPT_FUNCTION(func) INTERCEPT_FUNCTION_WIN(func) argument
382 # define INTERCEPT_FUNCTION_VER(func, symver) \ argument
383 INTERCEPT_FUNCTION_VER_WIN(func, symver)