objdump recognising ARM ELF file
Richard Sandiford
rdsandiford@googlemail.com
Fri Aug 2 13:38:00 GMT 2013
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
More information about the Binutils
mailing list