Skip to content
Latchkey

objdump: Usage, Options & Common CI Errors

objdump disassembles binaries and dumps their sections, symbols, and headers.

objdump is the Swiss-army inspector for compiled output. In CI it answers "what architecture is this object?" and "did the compiler actually emit this code?", which is how you catch cross-compile and ABI mismatches.

What it does

objdump displays information from object files: disassembly (-d), section headers (-h), the symbol table (-t), dynamic symbols (-T), and relocations (-r). It understands many architectures and file formats via libbfd.

Common usage

Terminal
objdump -d app.o                   # disassemble code
objdump -t app.o                   # symbol table
objdump -h app                     # section headers
objdump -T libfoo.so               # dynamic symbol table
objdump -d -C app | less           # demangled disassembly

Options

FlagWhat it does
-d / -DDisassemble code / all sections
-t / -TSymbol table / dynamic symbol table
-hSection headers and sizes
-r / -RRelocation entries
-CDemangle C++ names

Common errors in CI

"File format not recognized" means objdump (or its libbfd) does not know this file - often a wrong-architecture object from a cross-compile, or not an object at all. To diagnose a "skipping incompatible" linker warning, objdump -f or readelf -h reveals the target machine (e.g. x86-64 vs aarch64). The host objdump may not disassemble a foreign arch; use the target-prefixed binutils (e.g. arm-none-eabi-objdump) instead.

Related guides

Run this faster and cheaper on Latchkey managed runners. Start free →