{"id":704,"date":"2014-09-26T19:02:37","date_gmt":"2014-09-26T11:02:37","guid":{"rendered":"http:\/\/blog.qdac.cc\/?p=704"},"modified":"2014-09-26T19:02:37","modified_gmt":"2014-09-26T11:02:37","slug":"delphic-builder-map%e6%96%87%e4%bb%b6%e6%a0%bc%e5%bc%8f%e8%a7%a3%e6%9e%90","status":"publish","type":"post","link":"https:\/\/blog.qdac.cc\/?p=704","title":{"rendered":"Delphi\/C++ Builder Map\u6587\u4ef6\u683c\u5f0f\u89e3\u6790"},"content":{"rendered":"<h4 style=\"text-align: left;\">\u3010\u8f6c\u8f7d\u8bf7\u6ce8\u660e\u51fa\u5904\u53ca\u4f5c\u8005\uff0c\u6587\u7ae0\u53d1\u73b0\u95ee\u9898\u4f1a\u968f\u65f6\u66f4\u65b0\uff0c\u8981\u4fdd\u8bc1\u6d4f\u89c8\u6700\u65b0\u7248\u672c\uff0c\u8bf7\u8bbf\u95ee\u5b98\u7f51:blog.qdac.cc\u3011<\/h4>\n<p>Delphi\u6216C++ Builder\u5728\u7f16\u8bd1\u7a0b\u5e8f\u94fe\u63a5\u65f6\uff0c\u53ef\u4ee5\u9009\u62e9\u751f\u6210\u6269\u5c55\u540d\u4e3a.map\u7684\u6587\u4ef6\u7b26\u53f7\u6620\u5c04\u6587\u4ef6\uff0c\u8fd9\u4e2a\u6587\u4ef6\u8bb0\u5f55\u4e86\u7a0b\u5e8f\u4e2d\u5404\u4e2a\u51fd\u6570\u3001\u53d8\u91cf\u7684\u5730\u5740\u7b49\u4fe1\u606f\uff0c\u6211\u4eec\u4eca\u5929\u8981\u505a\u7684\u5c31\u662f\u89e3\u6790\u8fd9\u4e2a\u6587\u4ef6\u7684\u683c\u5f0f\uff0c\u4ee5\u4fbf\u5728QWorker\u4e2d\uff0c\u80fd\u591f\u5b9e\u65f6\u8ddf\u8e2a\u5f53\u524d\u6b63\u5728\u6267\u884c\u7684\u4f5c\u4e1a\u51fd\u6570\u3002<\/p>\n<p>\u9996\u5148\uff0c\u6211\u4eec\u6765\u4e86\u89e3\u4e00\u4e0b\u5982\u679c\u8ba9\u7f16\u8bd1\u5668\u751f\u6210map\u6587\u4ef6\uff1a<\/p>\n<p>\u5728\u5de5\u7a0b\u9009\u9879\u91cc\uff08Project-&gt;Options-&gt;Delphi Compiler-&gt;Linking)\uff0c\u5c06\u5176\u4e2d\u7684 Map file generate \u8bbe\u7f6e\u4e3aDetail\u6a21\u5f0f\uff0c\u4ee5\u4fbf\u751f\u6210\u6211\u4eec\u9700\u8981\u7684\u7b26\u53f7\u6620\u5c04\u6587\u4ef6\u3002<\/p>\n<p><a href=\"https:\/\/blog.qdac.cc\/wp-content\/uploads\/2014\/09\/QQ\u622a\u56fe20140926103358.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-705\" src=\"https:\/\/blog.qdac.cc\/wp-content\/uploads\/2014\/09\/QQ\u622a\u56fe20140926103358-300x239.jpg\" alt=\"QQ\u622a\u56fe20140926103358\" width=\"300\" height=\"239\" srcset=\"https:\/\/blog.qdac.cc\/wp-content\/uploads\/2014\/09\/QQ\u622a\u56fe20140926103358-300x239.jpg 300w, https:\/\/blog.qdac.cc\/wp-content\/uploads\/2014\/09\/QQ\u622a\u56fe20140926103358.jpg 755w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p>\u7136\u540e\u6211\u4eec\u4e86\u8be6\u7ec6\u4e86\u89e3\u6240\u751f\u6210\u7684\u6587\u4ef6\u683c\u5f0f\uff1a<\/p>\n<h4>\u4e00\u3001\u6bb5\u5b9a\u4e49\u8868<\/h4>\n<pre class=\"lang:ini decode:true\">Start         Length     Name                   Class\r\n 0001:00401000 00227CC8H .text                   CODE\uff08\u4ee3\u7801\u6bb5\uff09\r\n 0002:00629000 00001728H .itext                  ICODE\uff08\u5bfc\u5165\u4ee3\u7801\u6bb5\uff09\r\n 0003:0062B000 00017AC4H .data                   DATA\uff08\u6570\u636e\u5e93\uff09\r\n 0004:00643000 00005860H .bss                    BSS\uff08\u5757\u8d77\u59cb\u504f\u79fb\uff0cBlock Start Segment\u7f29\u5199\uff09\r\n 0005:00000000 00000040H .tls                    TLS\uff08\u7ebf\u7a0b\u5c40\u90e8\u5b58\u8d2e\uff0cThread Local Storage\u7f29\u5199\uff09\r\n 0006:00400000 00000000H .pdata                  PDATA<\/pre>\n<p>\u6b64\u90e8\u5206\u63cf\u8ff0\u4e86\u5404\u4e2a\u6bb5\u7684\u7d22\u5f15\u53f7\u3001\u8d77\u59cb\u5730\u5740\u3001\u957f\u5ea6\u3001\u540d\u79f0\u548c\u7c7b\u578b\u4fe1\u606f\u3002\u6211\u4eec\u8981\u67e5\u627e\u51fd\u6570\u7684\u5730\u5740\u548c\u4ee3\u7801\u884c\u53f7\u7b49\u4fe1\u606f\uff0c\u53ea\u9700\u8981\u5173\u5fc3\u7b2c\u4e00\u4e2a\u4ee3\u7801\u6bb5\u7684\uff08CODE\uff09\u5185\u5bb9\u5c31\u53ef\u4ee5\u3002<\/p>\n<p>\u6211\u4eec\u53ef\u4ee5\u770b\u5230\u8fd9\u4e2a\u6620\u5c04\u6587\u4ef6\u4e2d\uff0c\u5e8f\u53f7\u662f0001\uff0c\u540e\u9762\u6211\u4eec\u53ea\u5173\u5fc3\u5b83\u8fd9\u4e00\u7c7b\u578b\u7684\u5b9a\u4e49\u3002\u4ee3\u7801\u6bb5\u7684\u8d77\u59cb\u504f\u79fb\u5730\u5740\u662f0x00401000\uff0c\u5176\u957f\u5ea6\u662f0x00227CC8(2260168)\u3002<\/p>\n<h4>\u4e8c\u3001\u6bb5\u8be6\u7ec6\u6620\u5c04\u8868<\/h4>\n<p>\u8fd9\u4e2a\u8868\u6807\u660e\u4e86\u6bb5\u7684\u8be6\u7ec6\u5206\u914d\u60c5\u51b5\uff0c\u4f9d\u6b21\u662f\u6bb5\u7c7b\u522b\u5e8f\u53f7:\u6bb5\u5185\u504f\u79fb\u3001\u957f\u5ea6\u3001\u7c7b\u578b\u3001\u6bb5\u540d\u79f0\u3001\u5206\u7ec4\uff08\uff1f\u4e0d\u786e\u5b9a\uff09\u3001\u547d\u540d\u7a7a\u95f4\uff0cACBP\u4e0d\u6e05\u695a\u662f\u4ec0\u4e48<\/p>\n<pre class=\"lang:ini decode:true \">Detailed map of segments\r\n\r\n 0001:00000000 0000D0A0 C=CODE     S=.text    G=(none)   M=System   ACBP=A9\r\n 0001:0000D0A0 00000734 C=CODE     S=.text    G=(none)   M=SysInit  ACBP=A9\r\n 0001:0000D7D4 00001A8C C=CODE     S=.text    G=(none)   M=System.Types ACBP=A9\r\n 0001:0000F260 00000768 C=CODE     S=.text    G=(none)   M=System.UITypes ACBP=A9\r\n 0001:0000F9C8 00001C88 C=CODE     S=.text    G=(none)   M=Winapi.Windows ACBP=A9\r\n 0001:00011650 00000330 C=CODE     S=.text    G=(none)   M=Winapi.Messages ACBP=A9\r\n 0001:00011980 00000390 C=CODE     S=.text    G=(none)   M=System.SysConst ACBP=A9\r\n 0001:00011D10 00000320 C=CODE     S=.text    G=(none)   M=System.RTLConsts ACBP=A9<\/pre>\n<p>\u901a\u8fc7\u6bb5\u8d77\u59cb\u504f\u79fb+\u6bb5\u5185\u504f\u79fb\uff0c\u53ef\u4ee5\u5f88\u5bb9\u6613\u770b\u5230\u76f8\u5e94\u90e8\u5206\u4ee3\u7801\u6240\u96b6\u5c5e\u7684\u547d\u540d\u7a7a\u95f4\uff0c\u53cd\u8fc7\u6765\u4e5f\u53ef\u4ee5\u5f88\u5bb9\u6613\u7684\u627e\u5230\u547d\u540d\u7a7a\u95f4\u5bf9\u5e94\u7684\u4ee3\u7801\u8303\u56f4\u3002\u5728\u6211\u4eec\u7684\u9700\u6c42\u4e2d\uff0c\u8fd9\u6bb5\u6ca1\u6709\u4f7f\u7528\u3002<\/p>\n<h4>\u4e09\u3001\u51fd\u6570\u6620\u5c04\u8868<\/h4>\n<p>\u8fd9\u4e2a\u8868\u8bb0\u5f55\u4e86\u6bcf\u4e2a\u51fd\u6570\u7684\u5730\u5740\u504f\u79fb\u60c5\u51b5\uff0c\u53ef\u4ee5\u6839\u636e\u6307\u5b9a\u7684\u51fd\u6570\u6307\u9488\u5730\u5740\u6216EIP\u5bc4\u5b58\u5668\u7684\u503c\uff0c\u5f97\u5230\u5176\u5bf9\u5e94\u7684\u51fd\u6570\u540d\u79f0\uff1a<\/p>\n<pre class=\"lang:delphi decode:true \">Address             Publics by Name\r\n\r\n 0001:0021E30C       main..TAutoFreeTestObject\r\n 0001:0021CFE0       main..TForm1\r\n 0001:0021EE1C       main..TForm1.Button20Click$15$ActRec\r\n 0001:0021F4C4       main..TForm1.Button31Click$30$ActRec\r\n 0003:00017374       main.ACount\r\n 0001:0021F37C       main.DoFreeJobDataC1\r\n 0001:0021EA90       main.DoGlobalJob\r\n 0004:0000585C       main.Form1\r\n 0001:0021F874       main.RunWithPoster<\/pre>\n<p>\u8fd9\u4e2a\u53ea\u5305\u542b\u4e24\u5217\uff1a\u5730\u5740\uff08\u6bb5\u5e8f\u53f7:\u6bb5\u5185\u504f\u79fb\u5730\u5740\uff09\u3001\u51fd\u6570\u540d\uff08Publics by Name\uff09\uff0c\u89e3\u6790\u8d77\u6765\u5f88\u7b80\u5355\u3002<\/p>\n<h4>\u56db\u3001\u4ee3\u7801\u884c\u6620\u5c04\u8868<\/h4>\n<p>\u8fd9\u4e2a\u8868\u8bb0\u5f55\u4e86\u6bcf\u4e00\u884c\u5bf9\u5e94\u7684\u4ee3\u7801\u5730\u5740\u504f\u79fb\uff0c\u5176\u884c\u6807\u9898\u6307\u540d\u4e86\u5176\u547d\u540d\u7a7a\u95f4\u548c\u6587\u4ef6\u540d\u3002\u540c\u4e00\u547d\u540d\u7a7a\u95f4\uff0c\u5982\u679c\u4f4d\u4e8e\u4e0d\u540c\u6587\u4ef6\u4e2d\uff0c\u4f1a\u88ab\u5206\u6210\u4e0d\u884c\u7684\u5217\u8868\u3002\u6211\u4eec\u5728QMapSymbols\u5b9e\u73b0\u65f6\uff0c\u6ca1\u6709\u4f7f\u7528\u524d\u9762\u6bb5\u8be6\u7ec6\u4fe1\u606f\u6620\u5c04\u8868\uff0c\u76f4\u63a5\u89e3\u6790\u4e86\u6b64\u5904\u7684\u5185\u5bb9\uff0c\u5f97\u5230\u547d\u540d\u7a7a\u95f4\u548c\u6e90\u7801\u6240\u5728\u7684\u6587\u4ef6\u540d\u3002<\/p>\n<pre class=\"lang:delphi decode:true \">Line numbers for qstring(qstring.pas) segment .text\r\n\r\n   585 0001:001DA8E4   586 0001:001DA8EB   587 0001:001DA8F6   588 0001:001DA915\r\n   589 0001:001DA920   591 0001:001DA92C   592 0001:001DA933   597 0001:001DA938\r\n   598 0001:001DA958   599 0001:001DA966   600 0001:001DA96A   603 0001:001DA98E<\/pre>\n<p>\u8fd9\u4e2a\u6620\u5c04\u8868\u6bcf\u9879\u5b9e\u9645\u7531\u4e24\u90e8\u5206\u6784\u6210\uff1a\u884c\u53f7\u3001\u5730\u5740\uff08\u6bb5\u5e8f\u53f7:\u6bb5\u5185\u504f\u79fb\uff09\uff0c\u89e3\u6790\u65f6\u6ce8\u610f\u8fd9\u4e2a\u6620\u5c04\u8868\u6709\u5f88\u591a\uff0c\u6bcf\u4e2a\u6e90\u7801+\u547d\u540d\u7a7a\u95f4\u7ec4\u5408\u5c31\u662f\u4e00\u4e2a\u3002<\/p>\n<h4>\u3010\u9644\u6ce8\u3011<\/h4>\n<p>\u6211\u4eec\u5ffd\u7565\u4e86\u4e09\u4e2a\u90e8\u5206\u7684\u8bf4\u660e\uff1a<\/p>\n<p>1\u3001Publics by value\u5c0f\u8282\u7684\u5185\u5bb9\u7684\u89e3\u6790\uff0c\u90a3\u91cc\u8bb0\u5f55\u7684\u662f\u5168\u5c40\u53d8\u91cf\u7b49\u7684\u6620\u5c04\u4fe1\u606f\uff0c\u6211\u4eec\u7528\u4e0d\u5230\uff0c\u6240\u4ee5\u6ca1\u6709\u4f7f\u7528\u3002<\/p>\n<p>2\u3001Bound resource files\u662f\u7ed1\u5b9a\u7684\u8d44\u6e90\u6587\u4ef6\u4fe1\u606f\uff0c\u6211\u4eec\u7528\u4e0d\u5230\uff0c\u6240\u4ee5\u4e5f\u5c31\u5ffd\u7565\u672a\u66fe\u6dfb\u52a0\u3002<\/p>\n<p>3\u3001Program entry point at \u662f\u7a0b\u5e8f\u5165\u53e3\u5730\u5740\uff0c\u6211\u4eec\u4e5f\u7528\u4e0d\u5230\uff0c\u5ffd\u7565\u3002<\/p>\n<h4>\u3010\u5730\u5740\u6362\u7b97\u3011<\/h4>\n<p>\u6ce8\u610f\u8ba1\u7b97\u5b9e\u9645\u7a0b\u5e8f\u65f6\u5740\u65f6\uff0c\u8981\u52a0\u4e0a\u4e00\u4e2a\u8d77\u59cb\u504f\u79fb\u91cf\u7684\uff0c\u5982<\/p>\n<p><a href=\"https:\/\/blog.qdac.cc\/wp-content\/uploads\/2014\/09\/QQ\u622a\u56fe20140924154616.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-706\" src=\"https:\/\/blog.qdac.cc\/wp-content\/uploads\/2014\/09\/QQ\u622a\u56fe20140924154616-300x156.jpg\" alt=\"QQ\u622a\u56fe20140924154616\" width=\"300\" height=\"156\" srcset=\"https:\/\/blog.qdac.cc\/wp-content\/uploads\/2014\/09\/QQ\u622a\u56fe20140924154616-300x156.jpg 300w, https:\/\/blog.qdac.cc\/wp-content\/uploads\/2014\/09\/QQ\u622a\u56fe20140924154616.jpg 622w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p>\u56fe\u4e2d\u7684\u4ee3\u7801\u5730\u5740\u662f0x006206CB\uff0c\u8f6c\u6362\u6210Map\u6587\u4ef6\u4e2d\u7684\u5730\u5740\u8981\u51cf\u53bb\u7b2c\u4e00\u4e2a\u6bb5\u4e2d\u58f0\u660e\u7684\u4ee3\u7801\u6bb5\u7684\u8d77\u59cb\u504f\u79fb\u91cf0x00401000\uff0c\u5f97\u5230\u7684\u7ed3\u679c\u662f0x21F6CB\uff0c\u7136\u540e\u6211\u4eec\u5728Map\u6587\u4ef6\u4e2d\u627e\u8fd9\u4e2a\u5730\u5740\uff0c\u53ef\u4ee5\u5f97\u51fa\u7ed3\u679c\u4e3a\uff1a<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u3010\u8f6c\u8f7d\u8bf7\u6ce8\u660e\u51fa\u5904\u53ca\u4f5c\u8005\uff0c\u6587\u7ae0\u53d1\u73b0\u95ee\u9898\u4f1a\u968f [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"default","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","ast-disable-related-posts":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"default","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"footnotes":""},"categories":[69,8,21],"tags":[77,78],"class_list":["post-704","post","type-post","status-publish","format-standard","hentry","category-c-builder","category-delphi","category-misc","tag-map","tag-78"],"views":6749,"_links":{"self":[{"href":"https:\/\/blog.qdac.cc\/index.php?rest_route=\/wp\/v2\/posts\/704","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.qdac.cc\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.qdac.cc\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.qdac.cc\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.qdac.cc\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=704"}],"version-history":[{"count":1,"href":"https:\/\/blog.qdac.cc\/index.php?rest_route=\/wp\/v2\/posts\/704\/revisions"}],"predecessor-version":[{"id":707,"href":"https:\/\/blog.qdac.cc\/index.php?rest_route=\/wp\/v2\/posts\/704\/revisions\/707"}],"wp:attachment":[{"href":"https:\/\/blog.qdac.cc\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=704"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.qdac.cc\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=704"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.qdac.cc\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=704"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}