码迷,mamicode.com
首页 > Windows程序 > 详细

[Windows]_[中级]_[使用命令行工具dumpbin分析文件]

时间:2014-11-20 01:35:51      阅读:286      评论:0      收藏:0      [点我收藏+]

标签:c++   dumpbin   导出符号   32bit   64bit   


dumpbin(vs自带)

1. 导出lib文件的函数符号(symbols)

dumpbin /exports zlib1.lib

Microsoft (R) COFF/PE Dumper Version 10.00.40219.01
Copyright (C) Microsoft Corporation.  All rights reserved.


Dump of file zlib1.lib

File Type: LIBRARY

     Exports

       ordinal    name

             1    _adler32@12
           140    _adler32_combine@12
            39    _compress2@20
             2    _compress@16
            46    _compressBound@4
             3    _crc32@12

2.查看PE文件是32 bit还是64 bit.

dumpbin /HEADERS libgcc_s_seh_64-1.dll


64 bit

E:\software\TDM-GCC-64\bin>dumpbin /HEADERS libgcc_s_seh_64-1.dll
Microsoft (R) COFF/PE Dumper Version 10.00.40219.01
Copyright (C) Microsoft Corporation.  All rights reserved.


Dump of file libgcc_s_seh_64-1.dll

PE signature found

File Type: DLL

FILE HEADER VALUES
            8664 machine (x64)

32 bit
E:\software\TDM-GCC-64\bin>dumpbin /HEADERS g++.exe
Microsoft (R) COFF/PE Dumper Version 10.00.40219.01
Copyright (C) Microsoft Corporation.  All rights reserved.


Dump of file g++.exe

PE signature found

File Type: EXECUTABLE IMAGE

FILE HEADER VALUES
             14C machine (x86)


3.查看PE文件依赖,类似于Dependency Walker

dumpbin /DEPENDENTS libgcc_s_seh_64-1.dll

E:\software\TDM-GCC-64\bin>dumpbin /DEPENDENTS libgcc_s_seh_64-1.dll
Microsoft (R) COFF/PE Dumper Version 10.00.40219.01
Copyright (C) Microsoft Corporation.  All rights reserved.


Dump of file libgcc_s_seh_64-1.dll

File Type: DLL

  Image has the following dependencies:

    KERNEL32.dll
    msvcrt.dll

  Summary

        1000 .CRT
        1000 .bss
        1000 .data
        1000 .edata
        1000 .idata
        2000 .pdata
        2000 .rdata
        1000 .reloc
       16000 .text
        1000 .tls
        1000 .xdata


[Windows]_[中级]_[使用命令行工具dumpbin分析文件]

标签:c++   dumpbin   导出符号   32bit   64bit   

原文地址:http://blog.csdn.net/infoworld/article/details/41296209

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!