LinuxCommandLibrary

llvm-objdump

Disassemble object files and executables

TLDR

View documentation for the original command

$ tldr objdump
copy

SYNOPSIS

llvm-objdump [options] <object file...>

PARAMETERS

-d, --disassemble
    Disassemble all sections that contain executable instructions.

-D, --disassemble-all
    Disassemble all sections in the object file, including data sections.

-s, --full-contents
    Display the full contents of all requested sections.

-t, --syms
    Display the symbol table entries for the object file.

-x, --all-headers
    Display all available header information, including file, section, and symbol details.

-h, --section-headers
    Display the contents of the section headers.

-S, --source
    Intermix source code with disassembly, if debug information is available.

-r, --reloc
    Display the relocation entries in the file.

-C, --demangle
    Demangle low-level symbol names into user-level names (e.g., C++ functions).

-j <section>, --section=<section>
    Only process and display information for the specified section.

-M <options>, --disassembler-options=<options>
    Pass specific options to the disassembler (e.g., 'att' for AT&T syntax, 'intel' for Intel syntax).

--help
    Display help information for the command.

--version
    Display the version of llvm-objdump.

DESCRIPTION

llvm-objdump is a versatile command-line utility provided as part of the LLVM toolchain. It serves as an object file displayer, allowing users to examine the contents of object files, archives, and executables. Its primary function is to disassemble machine code into human-readable assembly, but it also provides extensive functionality to display various low-level details.

Users can inspect symbol tables, section headers, relocation entries, and other metadata embedded within the binary. While conceptually similar to the GNU objdump tool, llvm-objdump is specifically designed to work seamlessly with object files produced by LLVM compilers and toolchains. It supports a wide array of object file formats (like ELF, Mach-O, COFF) and architectures.

This tool is indispensable for software developers, reverse engineers, and security analysts who need to understand the compiled output of their code, debug issues at the machine code level, or analyze third-party binaries.

CAVEATS

llvm-objdump is primarily designed for binaries generated by LLVM toolchains, although it often works with others. Its output format may differ from GNU objdump, which can affect scripts expecting a specific format. Source intermixing with -S requires presence of debug information.

ARCHITECTURE SUPPORT

llvm-objdump supports a broad spectrum of processor architectures that LLVM targets, including but not limited to x86, ARM, AArch64, MIPS, PowerPC, RISC-V, and many others, reflecting LLVM's widespread applicability across various hardware platforms.

HISTORY

llvm-objdump is an integral part of the LLVM project, an open-source compiler infrastructure. It was developed to provide a native and often more advanced object file analysis tool for the LLVM ecosystem, serving as a counterpart to GNU Binutils' objdump. Its development has evolved with the LLVM compiler, continuously supporting new architectures, object file formats, and debugging information standards as they are integrated into the LLVM framework. Its modular design allows for flexible extensions and sophisticated analysis capabilities.

SEE ALSO

objdump(1), readelf(1), nm(1), llvm-readobj(1), llvm-nm(1)

Copied to clipboard