LLVM-READOBJ(1)

πŸ“¦
version 12.0.1 Β· 4 versions
, in fedora 43, fedora 44

✨ LLVM-READOBJ(1) β€” the LLVM Object Reader ✨

okay bestie, sit down, hydrate, and let me tell you about llvm-readobj, a little legend from the LLVM manual pages πŸ’–


πŸ¦‹ NAME πŸ¦‹

llvm-readobj β€” the LLVM Object Reader. that's it. that's the name. iconic behavior honestly πŸ’…


🌸 SYNOPSIS 🌸

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

short, sweet, and ready to spill all the tea about your object files ✨


πŸ’œ DESCRIPTION πŸ’œ

so basically, the llvm-readobj tool displays low-level format-specific information about one or more object files. like, it will genuinely tell you everything going on inside them. no secrets. no cap. πŸ”₯

and listen β€” if the input is "-", then llvm-readobj reads from standard input. otherwise? it reads from the specified filenames. simple as that, bestie 🫢


🌈 DIFFERENCES TO LLVM-READELF 🌈

okay so llvm-readelf is an alias for the llvm-readobj tool, but with a slightly different command-line interface and output that is GNU compatible. they're siblings, not twins. here's the whole list of differences between llvm-readelf and llvm-readobj:

  • llvm-readelf uses GNU for the --elf-output-style option by default. llvm-readobj uses LLVM. (yes, this matters. yes, it will trip you up. 😭)
  • 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. periodt.
  • llvm-readelf provides -s as an alias for --symbols, for GNU readelf compatibility, whereas it is an alias for --section-headers in llvm-readobj. (this one is genuinely evil, watch out πŸ’€)
  • 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 are unrelated to file formats. they're the everybody-friendly ones πŸ’–

  • --all β€” equivalent to specifying all the main display options relevant to the file format. the "give me everything" button. main character energy fr fr.
  • --addrsig β€” display the address-significance table.
  • --color β€” use colors in the output for warnings and errors. cute AND functional.
  • --expand-relocs β€” when used with --relocations, display each relocation in an expanded multi-line format. roomy. spacious. giving it space to breathe ✨
  • --file-headers, -h β€” display file headers.
  • --headers, -e β€” equivalent to setting: --file-headers, --program-headers, and --sections. a little combo meal πŸ“
  • --help β€” display a summary of command line options.
  • --help-list β€” display an uncategorized summary of command line options. no categories, just vibes.
  • --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, -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.
  • --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.
  • --symbols, --syms, -t β€” 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 up πŸ’œ

  • --arch-specific, -A β€” display architecture-specific information, e.g. the ARM attributes section on ARM.
  • --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.
  • --elf-hash-histogram, --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 and GNU. LLVM output (the default) is an expanded and structured format, whilst GNU output mimics the equivalent GNU readelf output.
  • --elf-section-groups, --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.
  • --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 girlies this one's for you 🍎

  • --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 besties, we see you 🫢

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

πŸ’… EXIT STATUS πŸ’…

llvm-readobj returns 0 under normal operation. it returns a non-zero exit code if there were any errors. that's it. zero means slay, non-zero means something went wrong 😭


πŸ‘€ SEE ALSO πŸ‘€

go read these too, they're all part of the family:


🌟 AUTHOR 🌟

maintained by the LLVM Team (https://llvm.org/). they're doing amazing sweetie πŸ’–


2003-2024, LLVM Project


and that's the whole page bestie!! this was the LLVM-READOBJ(1) manual, from the LLVM project β€” dated 2024-07-18, version 12 ✨ go forth and read your objects, you absolute icon πŸ‘‘

πŸ“¦ where this page comes from