LinuxCommandLibrary

llvm-objdump

Disassemble object files and executables

TLDR

View documentation for the original command

$ tldr objdump
copy

SYNOPSIS

llvm-objdump [options]

PARAMETERS

-all-headers
    Display all available header information.

-arch-name=
    Specify the target architecture.

-disassemble
    Disassemble the executable sections.

-d
    Same as -disassemble.

-disassemble-all
    Disassemble all sections, not just executable ones.

-D
    Same as -disassemble-all.

-fault-map-section
    Display contents of fault map section.

-file-headers
    Display file headers.

-f
    Same as -file-headers.

-help
    Display available options.

-macho
    Use Mach-O specific object file parser.

-mattr=
    Target specific attributes.

-private-headers
    Display format specific file headers.

-reloc
    Display relocation entries.

-r
    Same as -reloc.

-section-headers
    Display section headers.

-sections
    Same as -section-headers.

-headers
    Same as -file-headers and -section-headers.

-s
    Display the content of each section.

-source
    Intermix source line with disassembly.

-syms
    Display symbol table.

-t
    Same as -syms.

-universal-hex
    Dump the raw contents of universal headers.

-version
    Display the version of llvm-objdump.

-x
    Display all available information.

-triple=
    Specify the target triple.

DESCRIPTION

llvm-objdump is a command-line utility from the LLVM project used to display various information about object files, executables, and archive files. It acts as a cross-platform alternative to traditional objdump tools. It can disassemble code sections, display symbol tables, header information, relocation entries, and more. It supports a wide range of architectures and object file formats, including ELF, Mach-O, and COFF, providing developers with a versatile tool for examining and understanding compiled code. It is particularly useful for debugging, reverse engineering, and analyzing compiled programs. The tool offers functionalities such as showing section headers, displaying symbol tables, disassembling machine code, and exploring relocation information within object files. The information provided can be crucial in tasks like identifying code optimization opportunities, investigating runtime issues, or understanding the layout and structure of binary executables. It is frequently used in conjunction with other LLVM tools for code analysis and optimization.

EXIT STATUS

llvm-objdump exits with a non-zero status if an error occurs.

NOTES

The output format and information displayed can vary depending on the object file format and the options used. It requires object files to be created with debug information if intermixing of the source is needed.

HISTORY

llvm-objdump is part of the LLVM project, a collection of modular and reusable compiler and toolchain technologies. It was developed as a cross-platform alternative to traditional object file analysis tools, offering greater flexibility and wider architecture support. Its development has been ongoing alongside LLVM, with continuous improvements and new features added to enhance its capabilities. It has gained significant popularity for use in development, debugging, and reverse engineering.

SEE ALSO

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

Copied to clipboard