How to read a .obj file?

前端 未结 3 1324
离开以前
离开以前 2021-01-13 16:59

In visual studio a object file (.obj) is generating after compiling a c++ file. How to read and understand it? Also how to see the code after compiler optimization in Visual

3条回答
  •  有刺的猬
    2021-01-13 17:24

    Use the DUMPBIN tool from Visual Studio command prompt. Specifically, the /DISASM option shows you the disassembly. Do note the if you have link-time optimization enabled, then at least theoretically the final code may change after the .obj files are linked to form the final binary (.exe or .dll). You can disassemble those with DUMPBIN as well.

提交回复
热议问题