readelf-like tool for Mac OS X?
Using Macports:
- Install macports.
- Using macports
port install binutils
gobjdump -p /path/to/app
Using Homebrew:
- Install Homebrew
- Do
brew update && brew install binutils
/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