readelf-like tool for Mac OS X?

Using Macports:

  1. Install macports.
  2. Using macports port install binutils
  3. gobjdump -p /path/to/app

Using Homebrew:

  1. Install Homebrew
  2. Do brew update && brew install binutils
  3. /usr/local/path/to/gobjdump -p /path/to/app # or follow instructions to add it to your PATH

There are, of course, many other command-line options. Note that the binutils port cautions that installing it may cause other ports to fail to build. Having it around to port install/look at something/port uninstall can still be handy.

It's rather amazing that there isn't already some native tool to do this.


otool -l test.o