How can I install objdump on Mac OS X?

I want to get the source code of a small command line tool using objdump on Mac OS X.

I've used arm-linux-objdump on Linux and find it a great tool.

Is there any way to install objdump on OS X? I've searched Google and found information about arm-apple-dawin9-objdump, but failed to find anything to download.


Solution 1:

objdump is part of binutils.

Solution 2:

If you have XCode Tools installed on your Mac, you can use the otool that comes with it. I believe it does pretty much what objdump is capable of.

Solution 3:

If your file is 64bits, you should use otool instead of gobjdump from binutils. On Mac OSX, gobjdump is for 32bits.