objdump equivalent on macOS

Hi, I have just started today with assembler in college, we use linux in class, so the teacher is teaching us linux's commands. To disassemble, he have told us to use

objdump, but it doesn't work on macOS.

Is there an equivalent for disassemble on mac?

Thanks, Jesús

Answered by cyberfinger in 209430022

otool does the job of objdump for Mach-O binary files, MacOS's equivalent to Linux's ELF. Type

$ man otool

in Terminal.

Accepted Answer

otool does the job of objdump for Mach-O binary files, MacOS's equivalent to Linux's ELF. Type

$ man otool

in Terminal.

The short answer is ...

otool -tvV a.out

For more information, please read: https://stackoverflow.com/a/26169846/3755348

Try installing binutils using Homebrew. objdump is included in the formulae.

brew install binutils

I’m going to drop in a link to An Apple Library Primer, which explains a lot of the backstory here.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

objdump equivalent on macOS
 
 
Q