Skip to content

commands

yuyabu edited this page Jul 3, 2019 · 1 revision

コンパイラ開発に使う基本的なコマンドをまとめてある

逆アセンブル

objdump -d -M intel <target binary>

-d

       -d
       --disassemble
           Display the assembler mnemonics for the machine instructions from objfile.  This option only disassembles
           those sections which are expected to contain instructions.


-M intel

       -M options
       --disassembler-options=options
           Pass target specific information to the disassembler.  Only supported on some targets.  If it is necessary to
           specify more than one disassembler option then multiple -M options can be used or can be placed together into
           a comma separated list.


逆アセンブルオプションというらしい。

           "x86-64"
           "i386"
           "i8086"
               Select disassembly for the given architecture.

           "intel"
           "att"
               Select between intel syntax mode and AT&T syntax mode.

           "amd64"
           "intel64"
               Select between AMD64 ISA and Intel64 ISA.

           "intel-mnemonic"
           "att-mnemonic"
               Select between intel mnemonic mode and AT&T mnemonic mode.  Note: "intel-mnemonic" implies "intel" and
               "att-mnemonic" implies "att".

           "addr64"
           "addr32"
           "addr16"
           "data32"
           "data16"
               Specify the default address size and operand size.  These four options will be overridden if "x86-64",
               "i386" or "i8086" appear later in the option string.

           "suffix"
               When in AT&T mode, instructs the disassembler to print a mnemonic suffix even when the suffix could be
               inferred by the operands.

risc-vやmipsが見当たらないけどなにかプラグインでもあるんだろうか。

Clone this wiki locally