LLVM-READOBJ(1)

πŸ“¦ version 23.1.3, in centos-stream 9

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

okay so bestie, welcome to llvm-readobj(1) β€” the LLVM Object Reader, aka the girl who looks inside your object files and tells you everything. This is part of the LLVM fam (manual name: she's the LLVM manual page, periodt).


✨ SYNOPSIS ✨

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

That's it, that's the whole vibe. Options, then a bunch of input files, slay.


πŸ¦‹ DESCRIPTION πŸ¦‹

so like β€” llvm-readobj displays low-level format-specific information about one or more object files. She's not doing vibes-based summaries, she's giving you the raw, format-specific tea πŸ”₯.

And if input is -, she reads from standard input instead. Otherwise? She reads from the specified filenames. Easy. iykyk.


🌸 DIFFERENCES TO LLVM-READELF 🌸

okay so this is important: llvm-readelf is literally an alias for the llvm-readobj tool, just with a slightly different command-line interface and output that's GNU compatible. Same girl, different outfit πŸ’….

Here's the full list of differences, no skipping:

  • 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. rude but ok.
  • llvm-readelf provides -s as an alias for --symbols, for GNU readelf compatibility, whereas it's an alias for --section-headers in llvm-readobj. yes this is confusing bestie, I know 😭
  • 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. iconic conflict-avoidance tbh.

πŸ‘‘ GENERAL AND MULTI-FORMAT OPTIONS πŸ‘‘

these options are applicable to more than one file format, or are unrelated to file formats entirely. the versatile queens ✨

  • --addrsig β€” display the address-significance table. cute.
  • --all β€” equivalent to specifying all the main display options relevant to the file format. she's giving main character energy, she does it all 🫢
  • --decompress, -z β€” dump decompressed section content when used with -x or -p. If the section(s) are not compressed, they're displayed as is. no drama.
  • --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. she's spreading out, she needs space πŸ¦‹
  • --file-header, -h β€” display file headers.
  • --headers, -e β€” equivalent to setting: --file-header, --program-headers, and --sections. a bundle deal, we love a combo πŸ’–
  • --help β€” display a summary of command line options. when in doubt, ask her.
  • --hex-dump=<section[,section,...]>, -x β€” display the specified section(s) as hexadecimal bytes. section may be a section index or section name.
  • --needed-libs β€” display the needed libraries.
  • --no-demangle β€” do not demangle symbol names in the output. only for ELF and XCOFF file formats. ✨ the option is enabled by default ✨ (yes, this one, the no-version β€” that's the default. don't think about it too hard).
  • --offloading β€” display list of HIP offload bundles.
  • --relocations, --relocs, -r β€” display the relocation entries in the file.
  • --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. ⚠️ no effect for GNU style output.
  • --sections, --section-headers, -S β€” display all sections. all of them. every single one.
  • --section-symbols, --st β€” when used with --sections, display symbols for each section shown. ⚠️ 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. organize her, she loves it πŸŽ€
  • --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 πŸ’œ

the following options 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.

  • --call-graph-info β€” display the call graph section entries i.e. for each function its identifying information, each of its direct callees' information and for each indirect callee a 64-bit number representing the callee's function signature. This information can be used to reconstruct the program call graph. literally a whole family tree 😭
  • --cg-profile β€” display the callgraph profile section.
  • --dependent-libraries β€” display the dependent libraries section.
  • --dynamic-table, --dynamic, -d β€” display the dynamic table.
  • --dyn-relocations β€” display the dynamic relocation entries.
  • --dyn-symbols, --dyn-syms, --dt β€” display the dynamic symbol table.
  • --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. pick your aesthetic bestie πŸ’…
  • --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.
  • --histogram, -I β€” display a bucket list histogram for dynamic symbol hash tables.
  • --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. very demure, very mindful πŸŽ€
  • --notes, -n β€” display all notes.
  • --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. she's nothing without her girl.
  • --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 β€” display the program headers.
  • --section-groups, -g β€” display section groups.
  • --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 πŸ“

the following options 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 🧚

the following options 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-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.
  • --coff-tls-directory β€” display the TLS directory.

⭐ XCOFF SPECIFIC OPTIONS ⭐

the following options 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-relocations β€” display relocation entries of loader section.
  • --loader-section-symbols β€” display symbol table 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 if she's giving you a number that isn't zero, something's wrong bestie, go check 😭


🫢 SEE ALSO 🫢

llvm-nm(1), llvm-objdump(1), llvm-readelf(1) β€” go read those too, she'd want that for you.


🌈 AUTHOR 🌈

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


2003-2026, LLVM Project


and that's the whole page bestie πŸ’…βœ¨

✨ cute little sign-off: this masterpiece is from the LLVM source, dated 2026-10-06, and the original page number was 23 β€” she's been around a while, and she ate every single time πŸ”₯πŸ‘‘

no cap, go read some object files πŸ¦‹

πŸ“¦ where this page comes from