Disassemble into x86_64 on OSX10.6 (But with _Intel_ Syntax)

后端 未结 5 1919
庸人自扰
庸人自扰 2021-02-08 18:58

I know of otool -tv, but I would much rather use the Intel syntax rather than AT&Ts, mainly to easily follow along in a book and not have to look over

5条回答
  •  闹比i
    闹比i (楼主)
    2021-02-08 19:22

    (I know this is an old question, but I want to provide an updated answer for people who come here through search engines).

    On recent versions of macOS (I'm running 10.14.5), an objdump command is available, which is based on LLVM and is not the one from the GNU project. It offers a (hidden) option to disassemble using Intel syntax. For example, /bin/echo can be disassembled as follows:

    objdump -disassemble -x86-asm-syntax=intel /bin/echo
    

提交回复
热议问题