Dumpbin命令查看软件32位/64位

Dumpbin命令查看软件32位/64位

64位的程序是不能加载32位的库,32位的库和64位应用程序是不兼容的。 所以如果在load过程中发现出错,首先得确定所加载的库是64的。如何判断库是64位的?dumpbin.exe 它用来分析二进制库和程序的结构。在应用程序中找到 VS2010 -> VS tools -> VS x64 Win64 Command Prompt 执行dumpbin命令。下面分别为32位和64位库的不同。

32bit DLL

C:\Program Files (x86)\Java50\jre\bin\j9vm>dumpbin /headers jvm.dll

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


Dump of file jvm.dll

PE signature found

File Type: DLL

FILE HEADER VALUES
             14C machine (x86)
               5 number of sections
        4720D7EE time date stamp Fri Oct 26 01:52:46 2007
               0 file pointer to symbol table
               0 number of symbols
              E0 size of optional header
            210E characteristics
                   Executable
                   Line numbers stripped
                   Symbols stripped
                   32 bit word machine
                   DLL

64bit DLL

C:\Program Files\Java50\jre\bin\j9vm>dumpbin /headers jvm.dll

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


Dump of file jvm.dll

PE signature found

File Type: DLL

FILE HEADER VALUES
            8664 machine (x64)
               6 number of sections
        43696321 time date stamp Thu Nov 03 09:08:49 2005
               0 file pointer to symbol table
               0 number of symbols
              F0 size of optional header
            202E characteristics
                   Executable
                   Line numbers stripped
                   Symbols stripped
                   Application can handle large (>2GB) addresses
                   DLL



关于dumpbin的详细用法参考http://support.microsoft.com/kb/177429/en-us

你可能感兴趣的:(Dumpbin命令查看软件32位/64位)