obj2asm disassembles object (.obj) files in Intel OMF, Microsoft 32 and 64 bit COFF format, Linux ELF or Mac OS X Mach-O format, and writes out the corresponding assembler source code. (dmc++ generates Intel OMF format object files.) It works with the dmd D compiler, too.
16, 32 and 64 bit Intel x86 instruction sets are supported.
obj2asm automatically recognizes the object file format and instruction set to be disassembled.
Looking at the assembly language output of the compiler is highly useful for:
Compiling the file with the -gl option embeds line number information in the object file, enabling obj2asm to match the source code up with the generated assembler instructions. Compiling the file with the -g option embeds debug records in the object file, which obj2asm will format and output.
obj2asm commands have the following format:
obj2asm [-l -o -x] objectfile[.obj] [sourcefile] [-coutfile[.cod]]
To see the code generated by compiling test.cpp, use the following commands:
dmc -c -gl test obj2asm test
Note: Although the output of obj2asm is in masm format, it usually requires a little editting before masm will accept it.
obj2asm comes as part of the C/C++ Development System or the Extended Utility Package.
AltStyle によって変換されたページ (->オリジナル) / アドレス: モード: デフォルト 音声ブラウザ ルビ付き 配色反転 文字拡大 モバイル