2 / our buffer looks like
:
3 / eax
,ebx
,ecx
,edx
,esi
,edi
,esp
,ebp
,pc
5 / _longjmp is called with two parameters
: jmp_buf
*,int
6 / jmp_buf
* is at
4(%esp
), int is at
8(%esp
)
7 / retaddr is
, of course
, at
(%esp
)
13 movl
4(%esp
), %ebx
/ address of buf
14 movl
8(%esp
), %eax
/ store return value
16 movl
24(%ebx
), %esp
/ restore stack
18 / Next line sets up return address.
28 incl
%eax
/ eax hold
0 if we are here