?? 00000008.htm
字號:
<?xml version="1.0" encoding="gb2312"?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=gb2312"/><title>使用WIN32環境下的gcc及GNU 9(轉載) turbolinux </title></head><body><center><h1>BBS 水木清華站∶精華區</h1></center><a name="top"></a>發信人: sunno (民工☆五月天高人浮躁), 信區: Embedded <br />標 題: 使用WIN32環境下的gcc及GNU 9(轉載) <br />發信站: BBS 水木清華站 (Tue Jul 4 04:38:10 2000) <br /> <br />(轉載自笑書亭) <br /> <br />最后可通過命令行 <br />● objdump -d cprogram.exe <br />可看到最終的執行代碼及相應的反匯編代碼及重定位信息的回填情況: <br />絕對內存地址 機器代碼 反匯編代碼 <br />00401000 <_mainCRTStartup>: <br />401000: 55 push %ebp <br />... <br />00401040 <_addition>: <br />401040: 8b 44 24 04 mov 0x4(%esp,1),%eax <br />401044: 89 c1 mov %eax,%ecx <br />401046: b8 00 00 00 00 mov $0x0,%eax <br />... <br />00401080 <_main>: <br />401080: 55 push %ebp <br />401081: 89 e5 mov %esp,%ebp <br />401083: 83 ec 10 sub $0x10,%esp <br />401086: e8 c1 01 00 00 call 40124c <___main> <br />40108b: 68 50 10 40 00 push $0x401050 <br />401090: e8 c7 01 00 00 call 40125c <_printf> <br />401095: 83 c4 04 add $0x4,%esp <br />401098: 8d 45 fc lea 0xfffffffc(%ebp),%eax <br />40109b: 50 push %eax <br />40109c: 68 69 10 40 00 push $0x401069 <br />4010a1: e8 ae 01 00 00 call 401254 <_scanf> <br />4010a6: 83 c4 08 add $0x8,%esp <br />4010a9: 8b 45 fc mov 0xfffffffc(%ebp),%eax <br />4010ac: 50 push %eax <br />4010ad: e8 8e ff ff ff call 401040 <_addition> //4010b2 +ffffff8e=401040 <br />4010b2: 83 c4 04 add $0x4,%esp <br />4010b5: 89 c0 mov %eax,%eax <br />4010b7: 50 push %eax <br />4010b8: 68 6c 10 40 00 push $0x40106c <br />4010bd: e8 9a 01 00 00 call 40125c <_printf> <br />4010c2: 83 c4 08 add $0x8,%esp <br />4010c5: 89 ec mov %ebp,%esp <br />4010c7: 5d pop %ebp <br />4010c8: c3 ret <br />4010c9: 00 00 add %al,(%eax) <br />... <br />0040125c <_printf>: <br />40125c: ff 25 98 40 40 jmp *0x404098 <br />401261: 00 <br />401262: 90 nop <br />401263: 90 nop <br /> <br />-- <br />※ 來源:·BBS 水木清華站 smth.org·[FROM: 162.105.16.253] <br /><a href="00000007.htm">上一篇</a><a href="javascript:history.go(-1)">返回上一頁</a><a href="index.htm">回到目錄</a><a href="#top">回到頁首</a><a href="00000009.htm">下一篇</a></h1></center><center><h1>BBS 水木清華站∶精華區</h1></center></body></html>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -