LLVM-READOBJ(1)

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

okay bestie, welcome to the llvm-readobj page β€” brought to you by the LLVM manual, no cap ✨

✨ NAME ✨

llvm-readobj β€” the LLVM Object Reader 🫢

✨ SYNOPSIS ✨

llvm-readobj [options] [input…]

πŸ¦‹ DESCRIPTION πŸ¦‹

So like, the llvm-readobj tool shows you the low-level, format-specific deets about one or more object files. It's giving x-ray vision for binaries, honestly. πŸ”₯

If input is -, then llvm-readobj reads from standard input. Otherwise? It reads from the filenames you actually typed. Simple as that πŸ’…

🌸 DIFFERENCES TO LLVM-READELF 🌸

real talk: llvm-readelf is an alias for the llvm-readobj tool, except it has a slightly different command-line interface and output that's GNU compatible. Here's the full rundown of how llvm-readelf and llvm-readobj be differencing, iykyk:

  • 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 it is an alias for --section-headers in llvm-readobj.
  • 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 are applicable to more than one file format, or they're just, like, completely unrelated to file formats. versatile icons πŸ’…

  • --all β€” Equivalent to specifying all the main display options relevant to the file format. the "give me everything" button fr fr
  • --addrsig β€” Display the address-significance table. πŸ“‹
  • --expand-relocs β€” When used with --relocs, display each relocation in an expanded multi-line format. more lines, more info, more slay ✨
  • --file-header, -h β€” Display file headers.
  • --headers, -e β€” Equivalent to setting: --file-header, --program-headers, and --sections. a little bundle deal 🎁
  • --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.
  • --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. (yes, that means GNU output just ignores it, no drama 😭)
  • --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 🧚

The following options are implemented only for the ELF file format. ELF girlies, this one's for you πŸ’œ

  • --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.
  • --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. apple besties rise 🍎

  • --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. windows girlies, this is your moment πŸ‘‘

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

πŸ’€ 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 off 😭

πŸ¦‹ SEE ALSO πŸ¦‹

llvm-nm(1), llvm-objdump(1), llvm-readelf(1) β€” go read those too bestie, they're iconic πŸ‘‘

πŸ‘‘ AUTHOR πŸ‘‘

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

2003-2023, LLVM Project


okay that's the whole thing, no notes periodt πŸ’… β€” this was LLVM, page date 2023-07-14, that's the 15 release version, sourced straight from the LLVM Project manual. mwah, go read some object files 🫢✨🌸

πŸ“¦ where this page comes from