1 #if defined(__x86_64__) && defined(__linux__)
3 #include "sanitizer_common/sanitizer_asm.h"
5 .comm _ZN14__interception10real_vforkE,8,8
6 .globl ASM_WRAPPER_NAME(vfork)
7 ASM_TYPE_FUNCTION(ASM_WRAPPER_NAME(vfork))
8 ASM_WRAPPER_NAME(vfork):
10 // Store return address in the spill area and tear down the stack frame.
12 call COMMON_INTERCEPTOR_SPILL_AREA
17 call *_ZN14__interception10real_vforkE(%rip)
19 // Restore return address from the spill area.
22 call COMMON_INTERCEPTOR_SPILL_AREA
27 // Call handle_vfork in the parent process (%rax != 0).
32 call COMMON_INTERCEPTOR_HANDLE_VFORK@PLT
37 ASM_SIZE(ASM_WRAPPER_NAME(vfork))
39 ASM_INTERCEPTOR_TRAMPOLINE(vfork)
40 ASM_TRAMPOLINE_ALIAS(vfork, vfork)