This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: objdump recognising ARM ELF file
- From: Richard Sandiford <rdsandiford at googlemail dot com>
- To: Jon Grant <jg at jguk dot org>
- Cc: binutils at sourceware dot org
- Date: Fri, 02 Aug 2013 14:37:58 +0100
- Subject: Re: objdump recognising ARM ELF file
- References: <CAGc9EveZmSW_96SLFyDMbc3Ykb32tP9xkCm=hQiBj6jA+==YYg at mail dot gmail dot com>
Jon Grant <jg@jguk.org> writes:
> I am using cygwin's objdump, to look at an ARM ELF image. I noticed it
> shows as "UNKNOWN!". Was compiled by ARM RVCT compiler. Where the
> architecture is not known in this case, could the code number be
> output? (or is that the flags?). Is there a way to add this ARM
> architecture to the list. Was compiled by RVCT as Cortex-A9, fpu=VFPv3
By default objdump only supports the file formats of the host system
(in this case cygwin). You need "cross" versions of binutils if you
want to look at objects for other architectures. Cygwin might already
have an ARM package you can use, but if not, I'm afraid you'll need
to build binutils yourself.
One option is to configure binutils with something like --target=arm-eabi.
This will build an ARM-specific binutils, assembler and linker.
Another option is to configure binutils with --enable-targets=all.
This will give you a bloated cygwin objdump that supports all targets
at once.
There's some overlap in features between objdump and readelf.
If readelf does everything you need then it might be a better bet,
since it can handle all architectures. You should just be able to
use cygwin readelf as-is. That's no help if you're disassembling though.
Hope this helps, and sorry if I misunderstood the question.
Richard