1
給定兩個來自cl.exe
的PE對象文件,一個32位和一個64位,如何告訴另一個來自另一個而不使用使用unix實用程序,並最好在命令行(cmd.exe或PowerShell)?區分32位與由cl.exe生成的64位PE對象文件(Visual Studio C++)
C:\> "...\VC\bin\cl.exe" -c test.c -Fotest32.obj
C:\> "...\VC\bin\x86_amd64\cl.exe" -c test.c -Fotest64.obj
如果我安裝msys2的file
實用程序可以sortof有意義的是:
$ file test*.obj
test32.obj: Intel 80386 COFF object file, not stripped, 3 sections, [...]
test64.obj: data
file --version
是5.28,但較新的5.25不做任何好轉。 msys2不提供objdump.exe
,但是當拷貝到Linux它可以正確地告訴這兩個文件分開:
$ objdump -a test64.obj
test64.obj: file format pe-x86-64
$ objdump -a test32.obj
test32.obj: file format pe-i386
一些東西,確實優於file
,可通過msys2的吃豆子也提供可能是有趣的。
下面的微軟工具是'dumpbin'。 –
跨網站副本:http://superuser.com/q/358434/29943 –