有哪些 COFF(windows .obj 目标文件)查看器可用?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/2262959/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
What COFF (windows .obj object file) viewers are available?
提问by wozname
I am only aware of 2:
我只知道2:
- dumpbin which is included with Visual Studio
- PEView from http://wjradburn.com/software/
- dumpbin 包含在 Visual Studio 中
- 来自http://wjradburn.com/software/ 的PEView
采纳答案by John Knoeller
There is DbgHelp, but it's geared more toward the PE file rather than the object file. And Its intended to be used as an API rather than a tool.
有DbgHelp,但它更适合 PE 文件而不是目标文件。它旨在用作 API 而不是工具。
the COFF format itself originated on unix http://en.wikipedia.org/wiki/COFFalthough Microsoft has extended the format somewhat and the unix seems to have abandoned that format in favor of ELF. But you might find some useful tools in the Unix world, for instance this dump tool from SCO http://docsrv.sco.com:507/en/man/html.CP/dump.CP.html
COFF 格式本身起源于 unix http://en.wikipedia.org/wiki/COFF尽管微软已经扩展了该格式并且 unix 似乎已经放弃了该格式而支持 ELF。但是您可能会在 Unix 世界中找到一些有用的工具,例如来自 SCO http://docsrv.sco.com:507/en/man/html.CP/dump.CP.html 的这个转储工具
回答by lama12345
Just convert the COFF format to ELF and use some ELF viewer:
只需将 COFF 格式转换为 ELF 并使用一些 ELF 查看器:
objcopy.exe --input-target=pe-i386 --output-target=elf32-i386 somefile.o somefile.elf
For example in Python you can then use this one-file-implementation, which only depends on the struct module: http://www.tinyos.net/tinyos-2.1.0/tools/platforms/msp430/pybsl/elf.py
例如,在 Python 中,您可以使用此单文件实现,它仅取决于结构模块:http: //www.tinyos.net/tinyos-2.1.0/tools/platforms/msp430/pybsl/elf.py