Objdump for ARM64 Architecture

849 views Asked by At

I’ve encountered this error in Ubuntu with ARM64 (aarch64) architecture where Objdump doesnt wan’t to run. The error message for the following command «objdump -d filename»:

filename: file format elf64-little
objdump: can’t disassemble for architecture UNKNOWN!

Im not sure if objdump even runs on Aarch64 architecture. Does anyone have any ideas? Or is there any other command to disassembly an ETF file?

1

There are 1 answers

0
Peter Cordes On

GNU Binutils can only handle the one architecture chosen at build time. On an AArch64 Linux system, the system objdump command will be configured for aarch64-linux-gnu object files, which this isn't. If you had an x86-64-linux-gnu-objdump cross-toolchain installed, you could use that.

But you probably do already have a disassembler installed that can handle a variety of architectures:
llvm-objdump -d

LLVM can (and does) build support for multiple targets into one build of the tools. llvm-objdump will simply auto-detect the architecture and disassemble. (clang compiles for whatever target is was configured to use as the default, normally the native one. But clang -c -target mips works, for example, at least for stuff that doesn't need MIPS-specific headers or a library to link against.)