It is possible to read an object file?

Leandro picture Leandro · Dec 22, 2011 · Viewed 13.7k times · Source

I was curious about .obj files: I pretty much don't know what they are (or what they contain), so I opened them with Vim text editor and what I found inside was an Alien like language...

Is there any way to understand what they represent and what is their content Also, for what are they being used ?

Thanks.

Answer

paulsm4 picture paulsm4 · Dec 22, 2011

Sure.

But every different platform has a different object format. On Windows, you could use a tool like dumpbin (dumpbin comes with Visual Studio). On Linux, you could use "dumpobj", or disassemble the program.

Here's a good link for Linux:

http://www.linuxjournal.com/article/1060

PS: objdump also lets you disassemble the object. Like you used to be able to do with "debug" on DOS PCs...