LLVM-READOBJ(1)

πŸ’… LLVM-READOBJ(1) β€” the llvm-readobj manual, but make it make sense 🫢

okay so bestie, welcome to the LLVM Object Reader page (that's the llvm-readobj manual, from the LLVM fam πŸ’–). Grab a snack, we're reading object files' whole aura. ✨


🌸 SYNOPSIS 🌸

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

πŸ¦‹ DESCRIPTION πŸ¦‹

So llvm-readobj is that girl who lifts the lid on one or more object files and shows you all the low-level, format-specific tea inside. Literally format-specific info, no cap. πŸ‘‘

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


✨ DIFFERENCES TO LLVM-READELF ✨

Okay so llvm-readelf is basically an alias for the llvm-readobj tool, but with a slightly different command-line interface and GNU-compatible output. Here's the full rundown of how the two differ, no skips:

  • 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 -s is an alias for --section-headers.
  • 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 they're just plain not about file formats at all. Iconic, flexible, multi-format main character energy. 🌈

  • --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.
  • --expand-relocs β€” When used with --relocs, display each relocation in an expanded multi-line format. More lines, more room to vibe. ✨
  • --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. Heads up: 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. Sorting the symtab? she's organized. πŸŽ€
  • --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, this is your section. 🧚

  • --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. Glow-up for your JSON. ✨
  • --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 πŸ“

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-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 ⭐

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-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 like, zero means we ate, non-zero means something went off. 😭


🫢 SEE ALSO 🫢

llvm-nm(1), llvm-objdump(1), llvm-readelf(1) β€” go say hi to the rest of the friend group. πŸ’–


πŸ‘‘ AUTHOR πŸ‘‘

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


2003-2023, LLVM Project

ngl bestie, that's the whole page β€” every flag, every alias, every "no effect for GNU style output", all of it. Nothing skipped, periodt. πŸ’…

okay and for the cute sign-off: this one's the 17 release, dated 2023-12-01, and it's the LLVM project's page πŸŽ€ β€” that's the footer tea, absorbed into the vibe. Bye bestie, go read some object files πŸ’œπŸ¦‹

πŸ“¦ where this page comes from