Scroll to navigation

LLVM-READOBJ(1) LLVM LLVM-READOBJ(1)

NAME

llvm-readobj - LLVM Object Reader

SYNOPSIS

llvm-readobj [options] [input...]

DESCRIPTION

The llvm-readobj tool displays low-level format-specific information about one or more object files.

If input is "-", llvm-readobj reads from standard input. Otherwise, it will read from the specified filenames.

DIFFERENCES TO LLVM-READELF

llvm-readelf is an alias for the llvm-readobj tool with a slightly different command-line interface and output that is GNU compatible. Following is a list of differences between llvm-readelf and llvm-readobj:

  • llvm-readelf uses GNU for the --elf-output-style option by default. llvm-readobj uses LLVM.
  • llvm-readelf allows single-letter grouped flags (e.g. llvm-readelf -SW is the same as llvm-readelf -S -W). llvm-readobj does not allow grouping.
  • llvm-readelf provides -s as an alias for --symbols, for GNU readelf compatibility, whereas it is an alias for --section-headers in llvm-readobj.
  • llvm-readobj provides -t as an alias for --symbols. llvm-readelf does not.
  • llvm-readobj provides --sr, --sd, --st and --dt as aliases for --section-relocations, --section-data, --section-symbols and --dyn-symbols respectively. llvm-readelf does not provide these aliases, to avoid conflicting with grouped flags.

GENERAL AND MULTI-FORMAT OPTIONS

These options are applicable to more than one file format, or are unrelated to file formats.

Equivalent to specifying all the main display options relevant to the file format.

Display the address-significance table.

When used with --relocs, display each relocation in an expanded multi-line format.

Display file headers.

Equivalent to setting: --file-header, --program-headers, and --sections.

Display a summary of command line options.

Display the specified section(s) as hexadecimal bytes. section may be a section index or section name.

Display the needed libraries.

Display the relocation entries in the file.

Display all sections.

When used with --sections, display section data for each section shown. This option has no effect for GNU style output.

When used with --sections, display relocations for each section shown. This option has no effect for GNU style output.

When used with --sections, display symbols for each section shown. This option has no effect for GNU style output.

Display contents of the stackmap section.

Display the specified section(s) as a list of strings. section may be a section index or section name.

Display contents of the string table.

Display the symbol table.

Display unwind information.

Display the version of the llvm-readobj executable.

@<FILE>
Read command-line options from response file <FILE>.

ELF SPECIFIC OPTIONS

The following options are implemented only for the ELF file format.

Display architecture-specific information, e.g. the ARM attributes section on ARM.

Display the contents of the basic block address map section(s), which contain the address of each function, along with the relative offset of each basic block.

Display demangled symbol names in the output.

Display the dependent libraries section.

Display the dynamic relocation entries.

Display the dynamic symbol table.

Display the dynamic table.

Display the callgraph profile section.

Display a bucket list histogram for dynamic symbol hash tables.

Display the linker options section.

Format ELF information in the specified style. Valid options are LLVM and GNU. LLVM output (the default) is an expanded and structured format, whilst GNU output mimics the equivalent GNU readelf output.

Display section groups.

Display the GNU hash table for dynamic symbols.

Display the expanded hash table with dynamic symbol data.

Display the hash table for dynamic symbols.

Display all notes.

Display the program headers.

Do not decode relocations in RELR relocation sections when displaying them.

Display the section to segment mapping.

Display the contents of the stack sizes section(s), i.e. pairs of function names and the size of their stack frames. Currently only implemented for GNU style output.

--version-info, -V
Display version sections.

MACH-O SPECIFIC OPTIONS

The following options are implemented only for the Mach-O file format.

Display the Data in Code command.

Display the Dsymtab command.

Display indirect symbols.

Display the Mach-O-specific linker options.

Display the Segment command.

Display the version min command.

PE/COFF SPECIFIC OPTIONS

The following options are implemented only for the PE/COFF file format.

Display CodeView debug information.

--codeview-ghash
Enable global hashing for CodeView type stream de-duplication.

--codeview-merged-types
Display the merged CodeView type stream.

--codeview-subsection-bytes
Dump raw contents of CodeView debug sections and records.

Display the .reloc section.

Display the debug directory.

Display the TLS directory.

Display the .drectve section.

Display the export table.

Display the import table.

Display the load config.

Display the .rsrc section.

EXIT STATUS

llvm-readobj returns 0 under normal operation. It returns a non-zero exit code if there were any errors.

SEE ALSO

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

AUTHOR

Maintained by the LLVM Team (https://llvm.org/).

COPYRIGHT

2003-2022, LLVM Project

2022-02-03 13