LLVM-READOBJ(1)

πŸ’… LLVM-READOBJ(1) β€” the LLVM Object Reader, bestie edition

okay so welcome to llvm-readobj, part of the LLVM manual crew ✨ This is the page that tells you literally everything this tool can do, and yes we're gonna get through all of it together, no skipping, periodt.


🌸 NAME 🌸

llvm-readobj β€” LLVM Object Reader. That's the whole name, she's simple like that πŸ’–

πŸŽ€ SYNOPSIS πŸŽ€

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

πŸ¦‹ DESCRIPTION πŸ¦‹

So llvm-readobj is the tool that spills all the low-level, format-specific tea about one or more object files πŸ’… Like, the deep structural stuff, not vibes.

And here's a cute lil detail: if input is -, then llvm-readobj reads from standard input. Otherwise it reads from the filenames you give it. Easy 🫢

πŸ’œ DIFFERENCES TO LLVM-READELF πŸ’œ

Okay so llvm-readelf is literally an alias for the llvm-readobj tool (yes, the one from llvm-readobj.html) β€” but with a slightly different command-line interface and output that's GNU compatible. Here's the rundown of how the two sisters differ, fr fr:

  • 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 in llvm-readobj it's an alias for --section-headers. iconic chaos honestly 😭
  • 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 ones apply to more than one file format, or honestly they're just not about file formats at all. Main character energy, they go everywhere 🧚

  • --all β€” Equivalent to specifying all the main display options relevant to the file format. The "give me everything" button πŸ’…
  • --addrsig β€” Display the address-significance table.
  • --decompress, -z β€” Dump decompressed section content when used with -x or -p. If the section(s) are not compressed, they're displayed as is.
  • --demangle, -C β€” Display demangled symbol names in the output. This option is only for ELF and XCOFF file formats.
  • --expand-relocs β€” When used with --relocs, display each relocation in an expanded multi-line format.
  • --file-header, -h β€” Display file headers.
  • --headers, -e β€” Equivalent to setting: --file-header, --program-headers, and --sections.
  • --help β€” Display a summary of command line options.
  • --hex-dump=<section[,section,...]>, -x β€” Display the specified section(s) as hexadecimal bytes. section may be a section index or section name.
    • --memtag β€” Display information about memory tagging present in the binary. This includes various memtag-specific dynamic entries, decoded global descriptor sections, and decoded Android-specific ELF notes.
  • --needed-libs β€” Display the needed libraries.
  • --no-demangle β€” Do not demangle symbol names in the output. This option is only for ELF and XCOFF file formats. The option is enabled by default.
  • --relocations, --relocs, -r β€” Display the relocation entries in the file.
  • --sections, --section-headers, -S β€” Display all sections.
  • --section-data, --sd β€” When used with --sections, display section data for each section shown. This option has no effect for GNU style output.
  • --section-relocations, --sr β€” When used with --sections, display relocations for each section shown. This option has no effect for GNU style output.
  • --section-symbols, --st β€” When used with --sections, display symbols for each section shown. This option has no effect for GNU style output.
  • --sort-symbols=<sort_key[,sort_key]> β€” Specify the keys to sort symbols before displaying symtab. Valid values for sort_key are name and type.
  • --stackmap β€” Display contents of the stackmap section.
  • --string-dump=<section[,section,...]>, -p β€” Display the specified section(s) as a list of strings. section may be a section index or section name.
  • --string-table β€” Display contents of the string table.
  • --symbols, --syms, -s β€” Display the symbol table.
  • --unwind, -u β€” Display unwind information.
  • --version β€” Display the version of the llvm-readobj executable.
  • @<FILE> β€” Read command-line options from response file <FILE>.

🌈 ELF SPECIFIC OPTIONS 🌈

These ones are implemented only for the ELF file format. Elf girlies rise πŸ’–

  • --arch-specific, -A β€” Display architecture-specific information, e.g. the ARM attributes section on ARM.
  • --bb-addr-map β€” 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.

When pgo analysis maps are present, all analyses are printed as their raw value.

  • --pretty-pgo-analysis-map β€” When pgo analysis maps are present in the basic block address map section(s), analyses with special formats (i.e. BlockFrequency, BranchProbability, etc) are printed using the same format as their respective analysis pass.

Requires --bb-addr-map to have an effect. No --bb-addr-map, no effect, iykyk πŸ™ˆ

  • --dependent-libraries β€” Display the dependent libraries section.
  • --dyn-relocations β€” Display the dynamic relocation entries.
  • --dyn-symbols, --dyn-syms, --dt β€” Display the dynamic symbol table.
  • --dynamic-table, --dynamic, -d β€” Display the dynamic table.
  • --cg-profile β€” Display the callgraph profile section.
  • --histogram, -I β€” Display a bucket list histogram for dynamic symbol hash tables.
  • --elf-linker-options β€” Display the linker options section.
  • --elf-output-style=<value> β€” Format ELF information in the specified style. Valid options are LLVM, GNU, and JSON. LLVM output (the default) is an expanded and structured format. GNU output mimics the equivalent GNU readelf output. JSON is JSON formatted output intended for machine consumption.
  • --section-groups, -g β€” Display section groups.
  • --gnu-hash-table β€” Display the GNU hash table for dynamic symbols.
  • --hash-symbols β€” Display the expanded hash table with dynamic symbol data.
  • --hash-table β€” Display the hash table for dynamic symbols.
  • --memtag β€” Display information about memory tagging present in the binary. This includes various dynamic entries, decoded global descriptor sections, and decoded Android-specific ELF notes.
  • --notes, -n β€” Display all notes.
  • --pretty-print β€” When used with --elf-output-style, JSON output will be formatted in a more readable format.
  • --program-headers, --segments, -l β€” Display the program headers.
  • --section-mapping β€” Display the section to segment mapping.
  • --stack-sizes β€” 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 πŸ“

Only for the Mach-O file format, bestie πŸŽ€

  • --macho-data-in-code β€” Display the Data in Code command.
  • --macho-dsymtab β€” Display the Dsymtab command.
  • --macho-indirect-symbols β€” Display indirect symbols.
  • --macho-linker-options β€” Display the Mach-O-specific linker options.
  • --macho-segment β€” Display the Segment command.
  • --macho-version-min β€” Display the version min command.

🧚 PE/COFF SPECIFIC OPTIONS 🧚

Only for the PE/COFF file format, no cap πŸ’€

  • --codeview β€” 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.
  • --coff-basereloc β€” Display the .reloc section.
  • --coff-debug-directory β€” Display the debug directory.
  • --coff-tls-directory β€” Display the TLS directory.
  • --coff-directives β€” Display the .drectve section.
  • --coff-exports β€” Display the export table.
  • --coff-imports β€” Display the import table.
  • --coff-load-config β€” Display the load config.
  • --coff-resources β€” Display the .rsrc section.

πŸ‘‘ XCOFF SPECIFIC OPTIONS πŸ‘‘

Only for the XCOFF file format β€” rare girlie, we love her πŸ’œ

  • --auxiliary-header β€” Display XCOFF Auxiliary header.
  • --exception-section β€” Display XCOFF exception section entries.
  • --loader-section-header β€” Display XCOFF loader section header.
  • --loader-section-symbols β€” Display symbol table of loader section.
  • --loader-section-relocations β€” Display relocation entries of loader section.

πŸ’€ EXIT STATUS πŸ’€

llvm-readobj returns 0 under normal operation. She returns a non-zero exit code if there were any errors. So like, if it's mad, it's mad 😭


🌟 SEE ALSO 🌟

Go read those too, they're the friend group 🫢


πŸŽ€ Author πŸŽ€

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

2003-2026, LLVM Project


okay that's the whole page, you ate that πŸ’… mwah! quick sign-off: this was version 21, dated 2026-05-15, and it's LLVM-READOBJ(1) β€” see you in the next manpage bestie, mwah πŸ’–βœ¨

πŸ“¦ where this page comes from