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?
GNU Binutils can only handle the one architecture chosen at build time. On an AArch64 Linux system, the system
objdumpcommand will be configured for aarch64-linux-gnu object files, which this isn't. If you had anx86-64-linux-gnu-objdumpcross-toolchain installed, you could use that.But you probably do already have a disassembler installed that can handle a variety of architectures:
llvm-objdump -dLLVM can (and does) build support for multiple targets into one build of the tools.
llvm-objdumpwill simply auto-detect the architecture and disassemble. (clangcompiles for whatever target is was configured to use as the default, normally the native one. Butclang -c -target mipsworks, for example, at least for stuff that doesn't need MIPS-specific headers or a library to link against.)