11 .global wrapper_target
17 .type null_call, @function
22 .type wrapper, @function
25 pusha # store registers (EAX, ECX, EDX, EBX, ESP, EBP, ESI, EDI)
28 push %ebp # set up a stack frame
31 leal 4(%ebp), %eax # push flags addr
33 leal 8(%ebp), %eax # push registers addr
42 call *report_entry # report entry
47 leave # restore %esp, %ebp
49 popa # restore registers
51 popl caller_return # switch return addresses
52 pushl $.Lwrapper_return
54 jmp *wrapper_target # wrapper_target should return at .Lwrapper_return
58 pushl caller_return # restore the original return address
59 pusha # more for reference sake here
62 push %ebp # set up a stack frame
65 leal 4(%ebp), %eax # push flags addr
67 leal 8(%ebp), %eax # push registers addr
70 leal 40(%ebp), %edx # push stack top address (relative to our entry)
72 subl %edx, %eax # calculate difference between entry and previous frame
76 call *report_ret # report the return information (same args)