C????????????????
???????????? ???????[ 2015/3/9 14:33:30 ] ????????C ???? ???
????3.?????????
??????????????????????????????????????????????????????£?
1 g:
2 pushl %ebp //??????????????????????????????????????
3 movl %esp?? %ebp //??????????????
4 movl 8(%ebp)?? %eax //??????????????ò?????????ax?????
5 addl $3?? %eax //???+3????
6 popl %ebp //?????????????
7 ret //pop???EIP???????????
8 f:
9 pushl %ebp //??????????????????????????????????????
10 movl %esp?? %ebp //??????????????
11 subl $4?? %esp //???????????????????????g????
12 movl 8(%ebp)?? %eax //??ò???
13 movl %eax?? (%esp) //?????????????λ??
14 call g //????g
15 leave //?????????????
16 ret //????
17 main:
18 pushl %ebp
19 movl %esp?? %ebp
20 subl $4?? %esp //?????????????
21 movl $8?? (%esp) //????????
22 call f //????f
23 addl $1?? %eax //???+1????
24 leave //??????????
25 ret //????
?????????f??????????????????
????1. ???????enter???
?????????ebp?????????λ???????????????ebp????????esp??
????2.??????????????????
????3.????g
????4.??g????????????????AX??????У????ò?????????leave?????????
????5.??ret????EIP????????????λ?ü?????У????????AX?д???????ú???
????3.???????????
??????????????????????????????????????????????????????浱??????????????????????????????EBP???????????????????
??????EIP????????????????????????????С?
???????????????й??????????????
???????????麯??????????????????????????????????????????????????????????е?????
??????????麯???????????????????????к????????????п???????????
??????
???·???
??????????????????
2023/3/23 14:23:39???д?ò??????????
2023/3/22 16:17:39????????????????????Щ??
2022/6/14 16:14:27??????????????????????????
2021/10/18 15:37:44???????????????
2021/9/17 15:19:29???·???????·
2021/9/14 15:42:25?????????????
2021/5/28 17:25:47??????APP??????????
2021/5/8 17:01:11