LLVM-READOBJ(1)

πŸ’… llvm-readobj β€” the manual page, but make it cute

okay bestie, welcome to llvm-readobj(1) from the LLVM suite ✨ this is the tool that spills ALL the low-level, format-specific tea about your object files. no cap.


πŸ¦‹ SYNOPSIS

llvm-readobj [options] [input…]

🌸 DESCRIPTION

so basically, llvm-readobj shows you low-level format-specific information about one or more object files. it's giving x-ray vision for binaries πŸ’–

and if an input is literally just -, then llvm-readobj reads from standard input instead. otherwise? it reads from the filenames you gave it. simple as that, periodt.


πŸ‘‘ DIFFERENCES TO LLVM-READELF

okay so llvm-readelf is literally an alias for the llvm-readobj tool, except it has a slightly different command-line interface and its output is GNU compatible. here's the full rundown of how they differ, bestie, don't skip:

  • llvm-readelf uses GNU for the --elf-output-style option by default. llvm-readobj uses LLVM. different defaults, different vibes.
  • llvm-readelf allows single-letter grouped flags (like, llvm-readelf -SW is the same as llvm-readelf -S -W). llvm-readobj does not allow grouping. no grouping for you πŸ’€
  • llvm-readelf gives you -s as an alias for --symbols, for GNU readelf compatibility β€” whereas in llvm-readobj, -s is an alias for --section-headers. yes this is chaotic, yes it's real.
  • llvm-readobj provides -t as an alias for --symbols. llvm-readelf does not. (llvm-readobj stays winning πŸ’…)
  • 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. it's a whole thing.

✨ GENERAL AND MULTI-FORMAT OPTIONS

these options apply to more than one file format, or honestly they're just not about file formats at all. universal icons 🫢

  • --all β€” equivalent to specifying all the main display options relevant to the file format. literally the "give me everything" button.
  • --addrsig β€” displays the address-significance table. slay.
  • --expand-relocs β€” when used with --relocs, displays each relocation in an expanded multi-line format. roomier, more readable, we love.
  • --file-header, -h β€” displays file headers.
  • --headers, -e β€” equivalent to setting: --file-header, --program-headers, and --sections. a little combo meal πŸ“
  • --help β€” displays a summary of command line options. your friendly lil cheat sheet.
  • --hex-dump=<section[,section,...]>, -x β€” displays the specified section(s) as hexadecimal bytes. section may be a section index or a section name.
  • --needed-libs β€” displays the needed libraries.
  • --relocations, --relocs, -r β€” displays the relocation entries in the file.
  • --sections, --section-headers, -S β€” displays all sections.
  • --section-data, --sd β€” when used with --sections, displays section data for each section shown. this option has no effect for GNU style output.
  • --section-relocations, --sr β€” when used with --sections, displays relocations for each section shown. this option has no effect for GNU style output.
  • --section-symbols, --st β€” when used with --sections, displays symbols for each section shown. this option has no effect for GNU style output.
  • --stackmap β€” displays contents of the stackmap section.
  • --string-dump=<section[,section,...]>, -p β€” displays the specified section(s) as a list of strings. section may be a section index or a section name.
  • --string-table β€” displays contents of the string table.
  • --symbols, --syms, -s β€” displays the symbol table.
  • --unwind, -u β€” displays unwind information.
  • --version β€” displays the version of the llvm-readobj executable. main character energy.
  • @<FILE> β€” read command-line options from response file <FILE>. yes, files feeding files, it's giving inception πŸ™ˆ

🧚 ELF SPECIFIC OPTIONS

these ones are implemented only for the ELF file format. elf girlies rise 🌈

  • --arch-specific, -A β€” displays architecture-specific information, e.g. the ARM attributes section on ARM.
  • --bb-addr-map β€” displays 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 β€” displays demangled symbol names in the output. no more cryptic name soup πŸ’–
  • --dependent-libraries β€” displays the dependent libraries section.
  • --dyn-relocations β€” displays the dynamic relocation entries.
  • --dyn-symbols, --dyn-syms, --dt β€” displays the dynamic symbol table.
  • --dynamic-table, --dynamic, -d β€” displays the dynamic table.
  • --cg-profile β€” displays the callgraph profile section.
  • --histogram, -I β€” displays a bucket list histogram for dynamic symbol hash tables.
  • --elf-linker-options β€” displays the linker options section.
  • --elf-output-style=<value> β€” formats 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. pick your fighter ✨
  • --section-groups, -g β€” displays section groups.
  • --gnu-hash-table β€” displays the GNU hash table for dynamic symbols.
  • --hash-symbols β€” displays the expanded hash table with dynamic symbol data.
  • --hash-table β€” displays the hash table for dynamic symbols.
  • --notes, -n β€” displays all notes.
  • --pretty-print β€” when used with --elf-output-style, JSON output will be formatted in a more readable format. glow-up for your JSON πŸ’…
  • --program-headers, --segments, -l β€” displays the program headers.
  • --raw-relr β€” do not decode relocations in RELR relocation sections when displaying them.
  • --section-mapping β€” displays the section to segment mapping.
  • --stack-sizes β€” displays 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 β€” displays version sections.

πŸŽ€ MACH-O SPECIFIC OPTIONS

these ones are implemented only for the Mach-O file format.

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

⭐ PE/COFF SPECIFIC OPTIONS

these ones are implemented only for the PE/COFF file format.

  • --codeview β€” displays CodeView debug information.
  • --codeview-ghash β€” enable global hashing for CodeView type stream de-duplication.
  • --codeview-merged-types β€” displays the merged CodeView type stream.
  • --codeview-subsection-bytes β€” dump raw contents of CodeView debug sections and records.
  • --coff-basereloc β€” displays the .reloc section.
  • --coff-debug-directory β€” displays the debug directory.
  • --coff-tls-directory β€” displays the TLS directory.
  • --coff-directives β€” displays the .drectve section.
  • --coff-exports β€” displays the export table.
  • --coff-imports β€” displays the import table.
  • --coff-load-config β€” displays the load config.
  • --coff-resources β€” displays the .rsrc section.

πŸ“ XCOFF SPECIFIC OPTIONS

these ones are implemented only for the XCOFF file format.

  • --auxiliary-header β€” displays XCOFF Auxiliary header.

πŸ’€ EXIT STATUS

llvm-readobj returns 0 under normal operation. it returns a non-zero exit code if there were any errors. so like, 0 = we ate, non-zero = something went wrong bestie 😭


🌈 SEE ALSO

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

go read those too, they're the whole friend group 🫢


πŸ’œ AUTHOR

maintained by the LLVM Team (https://llvm.org/). iconic behavior, honestly.


2003-2025, LLVM Project


and that's the whole page, bestie!! ✨ this was LLVM-READOBJ(1), volume 14, dated 2025-05-22, straight from the LLVM source. ty for coming to my ted talk, go read some object files, and remember: keep every flag exactly as written, no cap πŸŽ€πŸ’–πŸ¦‹

πŸ“¦ where this page comes from