1 #if defined(__i386__) && defined(__linux__)
3 #include "sanitizer_common/sanitizer_asm.h"
5 .comm _ZN14__interception10real_vforkE,4,4
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
21 add $_GLOBAL_OFFSET_TABLE_+(.Ltmp0-.L0$pb), %eax
22 call *_ZN14__interception10real_vforkE@GOTOFF(%eax)
24 // Restore the stack frame.
25 // 12(%esp) return address
27 // 4(%esp) spill REAL(vfork) return value
28 // (%esp) call frame (arg0) for __*_handle_vfork
33 // Form GOT address in %ebx.
38 add $_GLOBAL_OFFSET_TABLE_+(.Ltmp1-.L1$pb), %ebx
40 // Restore original return address.
41 call COMMON_INTERCEPTOR_SPILL_AREA
46 // Call handle_vfork in the parent process (%rax != 0).
52 call COMMON_INTERCEPTOR_HANDLE_VFORK@PLT
61 ASM_INTERCEPTOR_TRAMPOLINE(vfork)
62 ASM_TRAMPOLINE_ALIAS(vfork, vfork)