VC6之MAP文件生成及格式

文件生成方式:

 VC 中,我们可以按下 Alt+F7 ,打开“Project Settings”选项页,选择 C/C++ 选项卡,并在最下面的 Project Options 里面输入:/Zd ,然后要选择 Link 选项卡,在最下面的 Project Options 里面输入: /mapinfo:lines 和 /map:PROJECT_NAME.map 。最后按下 F7 来编译生成 EXE 可执行文件和 MAP 文件

 

文件格式:

 

DllTwo                                                                                    //―――模块名

 

 Timestamp is 4956e425 (Sun Dec 28 10:27:49 2008)                   //―――时间戳

 

 Preferred load address is 10000000                                            //―――默认加载基地址

 

 Start         Length     Name                   Class                            //各节的起始地址、长度

 0001:00000000 00000da6H .text                   CODE                   //节名、类型等信息

 0001:00000db0 00000053H .text$x                 CODE

 0002:00000000 000000e8H .idata$5                DATA

 0002:000000e8 00000004H .CRT$XCA                DATA

……

 0002:00000100 000000b0H .rdata                  DATA

……

 0002:0000045c 00000782H .idata$6                DATA

 0002:00000be0 00000094H .edata                  DATA

 0003:00000000 00000014H .data                   DATA

 0003:00000018 00000354H .bss                    DATA

 

//各符号在节内的偏移地址、加载地址及符号出处

  Address         Publics by Value              Rva+Base       Lib:Object

 

 0000:00000003       ___safe_se_handler_count   00000003     <absolute>

 0000:00000000       ___ImageBase               10000000     <linker-defined>

 0001:00000000       ??4CDllTwo@@QAEAAV0@ABV0@@Z 10001000 f i DllTwo.obj

……

0001:00000804       __DllMainCRTStartup@12     10001804 f   MSVCRT:crtdll.obj

……

 0001:00000cd0       ?CrashFun@@YAHXZ           10001cd0 f   DllTwo.obj

 0001:00000cf0       _DllMain@12                10001cf0 f   DllTwo.obj

 0001:00000d00       ?PrintInDllTwo@@YAHXZ      10001d00 f   DllTwo.obj

 

 entry point at        0001:00000804                     //模块的入口地址

 

 Static symbols                                                 //静态符号

 

 0001:00000463       __catch$??$?6U?$char_traits@D@std@@@std@@YAAAV?$basic_ostream@DU?$char_traits@D@std@@@0@AAV10@PBD@Z$0 10001463 f i  CIL library: CIL module

 0001:000004de       _pre_c_init                100014de f   MSVCRT:crtdll.obj

 0001:000006ee       ___DllMainCRTStartup       100016ee f   MSVCRT:crtdll.obj

 0001:00000db0      

……

 

 Exports                                              //导出符号

 

  ordinal    name                                   //序号和名称

 

        1    ??4CDllTwo@@QAEAAV0@ABV0@@Z (public: class CDllTwo & __thiscall CDllTwo::operator=(class CDllTwo const &))

        2    ?CrashFun@@YAHXZ (int __cdecl CrashFun(void))

        3    ?PrintInDllTwo@@YAHXZ (int __cdecl PrintInDllTwo(void))

posted on 2017-12-05 22:47  strangeman  阅读(300)  评论(0编辑  收藏  举报

导航