Help using Binutils

Joe Abbey joe.abbey@gmail.com
Sun Feb 16 01:14:00 GMT 2020


For this sort of question, you'll almost certainly get a better answer from
the brew community: discourse.brew.sh   At any rate, looks like brew
installs the utilities here:

/usr/local/Cellar/binutils/2.34/bin/readelf
/usr/local/Cellar/binutils/2.34/bin/objdump

Note: macOS uses the Mach-O object file format, as opposed to the ELF
object file format (which readelf and objdump support).  To inspect
binaries compiled on a macOS system for running on a macOS system, you'll
need to use tools that can read Mach-O files.  If you've installed the
xcode command line tools (xcode-select --install), you'll have access to
otool which is similar in nature to readelf.

Cheers,

Joe

On Sat, Feb 15, 2020 at 6:59 PM Will Segars <wtsegars@me.com> wrote:

> To whom this may concern,
>
> I am currently learning C and C++ through a book that have and some of the
> exercises require me to use the “readelf” command or the “objdump” command.
> I installed binutils on my macOS using Homebrew, however, when I try to run
> a command, in particular “readelf”, the terminal will throw back an error
> and say that the command doesn’t exist. I’m not exactly sure what to do at
> this point because I have reinstalled binutils through Homebrew a few times
> now and nothing changed. Any answers as to what is going on would be
> helpful.
>
> Thank you much,
>
> Will



More information about the Binutils mailing list