Disassemble Microsoft Visual Studio 2003 compiler output

Posted by Carl Norum on Stack Overflow See other posts from Stack Overflow or by Carl Norum
Published on 2010-05-05T18:40:28Z Indexed on 2010/05/05 18:58 UTC
Read the original article Hit count: 425

Filed under:
|
|
|
|

I'm seeing what I think is strange behaviour from object files output by the Microsoft Visual Studio 2003 tools. The file utility tells me:

asmfile.obj: 80386 COFF executable not stripped - version 30821

For objects created by the assembler, but for objects coming from C files, I get just:

cfile.obj: data

Using Microsoft's dumpbin utility and the objdump I got from cygwin, I can disassemble the assembly-built file, but I get no useful results from either utility for the C-built files.

I have a couple of questions related to this difference:

  1. What is the object file format generated by the MSVC2003 compiler?
  2. How can I disassemble that object file?

I am particularly interested in getting the disassembly in AT&T syntax - I'm doing a port of a large source base to make it work with GCC, and I would like to use this method as a shortcut for some of the inline assembly routines in the project.

Thanks!

© Stack Overflow or respective owner

Related posts about visual-studio

Related posts about object