LLVM-READOBJ(1)

πŸ’– LLVM-READOBJ(1) πŸ’–

okay bestie, welcome to the llvm-readobj glow-up β€” it's the LLVM Object Reader, part of the LLVM fam, and honestly it's the main character of peeking inside object files πŸ‘‘


✨ NAME ✨

llvm-readobj β€” the LLVM Object Reader, aka your bestie for snooping on object files πŸ”


✨ SYNOPSIS ✨

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

✨ DESCRIPTION ✨

So the llvm-readobj tool shows you low-level, format-specific info about one or more object files. Think of it as the backstage pass to your binaries 🎟️

If input is -, llvm-readobj reads from standard input πŸ’… Otherwise it reads from the filenames you gave it. Simple as that, no cap.


✨ DIFFERENCES TO LLVM-READELF ✨

llvm-readelf is literally an alias for the llvm-readobj <llvm-readobj.html> tool, except it rocks a slightly different command-line interface and outputs stuff that's GNU compatible. Here's the tea on how they differ πŸ‘‡

  • llvm-readelf uses GNU as the default for the --elf-output-style option. llvm-readobj uses LLVM.
  • llvm-readelf lets you do single-letter grouped flags (like, llvm-readelf -SW is the same as llvm-readelf -S -W). llvm-readobj does not allow grouping.
  • llvm-readelf gives you -s as an alias for --symbols, for GNU readelf compatibility β€” but in llvm-readobj that same -s is an alias for --section-headers. sneaky, right? πŸ™ˆ
  • 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 doesn't provide these aliases, specifically to avoid conflicting with grouped flags.

✨ GENERAL AND MULTI-FORMAT OPTIONS ✨

These ones work across more than one file format, or they're just vibing and don't care about file formats at all πŸ¦‹

  • --all β€” Equivalent to specifying all the main display options relevant to the file format. the whole menu, basically πŸ“
  • --addrsig β€” Display the address-significance table.
  • --decompress, -z β€” Dump decompressed section content when used with -x or -p. If the section(s) aren't compressed, they're displayed as is.
  • --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.
  • --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>.
heads up bestie: --memtag shows up again down in the ELF section too β€” it's the same icon, she just likes to make an entrance twice πŸ’…

✨ ELF SPECIFIC OPTIONS ✨

These ones are implemented only for the ELF file format 🧚

  • --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.
  • --demangle, -C β€” Display demangled symbol names in the output.
  • --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.
  • --raw-relr β€” Do not decode relocations in RELR relocation sections when displaying them.
  • --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 ✨

These cuties are implemented only for the Mach-O file format 🌸

  • --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 ✨

These ones are implemented only for the PE/COFF file format ⭐

  • --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 ✨

These ones are implemented only for the XCOFF file format πŸŽ€

  • --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. It returns a non-zero exit code if there were any errors. so if you see a non-zero, something went sideways, and that's your cue to go investigate πŸ˜­πŸ’€


✨ SEE ALSO ✨


✨ Author ✨

Maintained by the LLVM Team (https://llvm.org/). iconic behavior honestly 🫢

2003-2026, LLVM Project


and that's the whole page bestie!! this one shipped as version 15, dated 2026-09-09, under the LLVM manual name β€” go forth and read those objects, you absolute icon πŸ’œπŸ‘‘πŸ¦‹

πŸ“¦ where this page comes from