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):
9 // Store return address in the spill area and tear down the stack frame.
11 call COMMON_INTERCEPTOR_SPILL_AREA
20 add $_GLOBAL_OFFSET_TABLE_+(.Ltmp0-.L0$pb), %eax
21 call *_ZN14__interception10real_vforkE@GOTOFF(%eax)
23 // Restore the stack frame.
24 // 12(%esp) return address
26 // 4(%esp) spill REAL(vfork) return value
27 // (%esp) call frame (arg0) for __*_handle_vfork
32 // Form GOT address in %ebx.
37 add $_GLOBAL_OFFSET_TABLE_+(.Ltmp1-.L1$pb), %ebx
39 // Restore original return address.
40 call COMMON_INTERCEPTOR_SPILL_AREA
45 // Call handle_vfork in the parent process (%rax != 0).
51 call COMMON_INTERCEPTOR_HANDLE_VFORK@PLT
61 .set vfork, ASM_WRAPPER_NAME(vfork)