[Windows]_[中級]_[使用命令列工具dumpbin分析檔案]

來源:互聯網
上載者:User

標籤:style   blog   http   io   ar   os   使用   sp   for   

dumpbin(vs內建)

1. 匯出lib檔案的函數符號(symbols)

dumpbin /exports zlib1.lib

[plain] view plaincopy
  1. Microsoft (R) COFF/PE Dumper Version 10.00.40219.01  
  2. Copyright (C) Microsoft Corporation.  All rights reserved.  
  3.   
  4.   
  5. Dump of file zlib1.lib  
  6.   
  7. File Type: LIBRARY  
  8.   
  9.      Exports  
  10.   
  11.        ordinal    name  
  12.   
  13.              1    [email protected]  
  14.            140    [email protected]  
  15.             39    [email protected]  
  16.              2    [email protected]  
  17.             46    [email protected]  
  18.              3    [email protected]  


2.查看PE檔案是32 bit還是64 bit.

dumpbin /HEADERS libgcc_s_seh_64-1.dll


64 bit

[plain] view plaincopy
  1. E:\software\TDM-GCC-64\bin>dumpbin /HEADERS libgcc_s_seh_64-1.dll  
  2. Microsoft (R) COFF/PE Dumper Version 10.00.40219.01  
  3. Copyright (C) Microsoft Corporation.  All rights reserved.  
  4.   
  5.   
  6. Dump of file libgcc_s_seh_64-1.dll  
  7.   
  8. PE signature found  
  9.   
  10. File Type: DLL  
  11.   
  12. FILE HEADER VALUES  
  13.             8664 machine (x64)  


32 bit

[plain] view plaincopy
  1. E:\software\TDM-GCC-64\bin>dumpbin /HEADERS g++.exe  
  2. Microsoft (R) COFF/PE Dumper Version 10.00.40219.01  
  3. Copyright (C) Microsoft Corporation.  All rights reserved.  
  4.   
  5.   
  6. Dump of file g++.exe  
  7.   
  8. PE signature found  
  9.   
  10. File Type: EXECUTABLE IMAGE  
  11.   
  12. FILE HEADER VALUES  
  13.              14C machine (x86)  


3.查看PE檔案依賴,類似於Dependency Walker

dumpbin /DEPENDENTS libgcc_s_seh_64-1.dll

[plain] view plaincopy
    1. E:\software\TDM-GCC-64\bin>dumpbin /DEPENDENTS libgcc_s_seh_64-1.dll  
    2. Microsoft (R) COFF/PE Dumper Version 10.00.40219.01  
    3. Copyright (C) Microsoft Corporation.  All rights reserved.  
    4.   
    5.   
    6. Dump of file libgcc_s_seh_64-1.dll  
    7.   
    8. File Type: DLL  
    9.   
    10.   Image has the following dependencies:  
    11.   
    12.     KERNEL32.dll  
    13.     msvcrt.dll  
    14.   
    15.   Summary  
    16.   
    17.         1000 .CRT  
    18.         1000 .bss  
    19.         1000 .data  
    20.         1000 .edata  
    21.         1000 .idata  
    22.         2000 .pdata  
    23.         2000 .rdata  
    24.         1000 .reloc  
    25.        16000 .text  
    26.         1000 .tls  
    27.         1000 .xdata 

[Windows]_[中級]_[使用命令列工具dumpbin分析檔案]

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.