LLVM-READOBJ(1)

πŸ“¦
version 11.1.0 Β· 2 versions
, in fedora 43, fedora 44

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

okay bestie, welcome to the LLVM manual page for llvm-readobj β€” yes, lowercase, yes it's an executable, no you cannot call it readobj and expect the vibes to carry you. sit down, grab a strawberry something πŸ“, and let's get into it.


✨ NAME ✨

llvm-readobj β€” the LLVM Object Reader, aka the girl who looks inside your object files and tells you everything she sees πŸ’…


✨ SYNOPSIS ✨

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

✨ DESCRIPTION ✨

so basically, llvm-readobj shows you low-level, format-specific info about one or more object files. like it's not giving you the summary, it's giving you the receipts. πŸ“„

if input is - or you just… don't give it anything, llvm-readobj reads from standard input. otherwise it reads from the filenames you specified. no cap.


✨ DIFFERENCES TO LLVM-READELF ✨

llvm-readelf is literally an alias for the llvm-readobj tool, but with a slightly different command-line interface and output that's GNU compatible. here's the tea on how they differ β˜•:

  • llvm-readelf defaults to GNU for the --elf-output-style option. llvm-readobj defaults to LLVM.
  • llvm-readelf lets you do single-letter grouped flags (like llvm-readelf -SW is the same as llvm-readelf -S -W). llvm-readobj does not allow grouping. grouping is not her thing, periodt.
  • llvm-readelf gives you -s as an alias for --symbols, for GNU readelf compatibility. but in llvm-readobj, -s is an alias for --section-headers. yes, they're different. no, this is not a drill. 😭
  • llvm-readobj gives you -t as an alias for --symbols. llvm-readelf does not.
  • llvm-readobj gives you --sr, --sd, --st and --dt as aliases for --section-relocations, --section-data, --section-symbols and --dyn-symbols respectively. llvm-readelf doesn't provide these aliases, because they'd conflict with grouped flags.

✨ GENERAL AND MULTI-FORMAT OPTIONS ✨

these options work for more than one file format, or honestly are just unrelated to file formats entirely. icons who don't pick sides 🫢

  • --all β€” equivalent to specifying all the main display options relevant to the file format. it's the "give me everything" of flags πŸ‘‘
  • --addrsig β€” display the address-significance table.
  • --color β€” use colors in the output for warnings and errors. 🌈
  • --expand-relocs β€” when used with --relocations, display each relocation in an expanded multi-line format.
  • --file-headers, -h β€” display file headers.
  • --headers, -e β€” equivalent to setting: --file-headers, --program-headers, and --sections.
  • --help β€” display a summary of command line options.
  • --help-list β€” display an uncategorized 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, -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, this section is for you πŸ’œ

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

these ones are implemented only for the Mach-O file format. mach-o 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 ✨

and these? 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-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. she returns a non-zero exit code if there were any errors β€” so if the number isn't zero, something went wrong, and that's your sign 😭


✨ SEE ALSO ✨

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


✨ AUTHOR ✨

maintained by the LLVM Team (<https://llvm.org/>). πŸ’–


2003-2024, LLVM Project


and that's the whole page bestie!! this one's from the LLVM manual, version 11, dated 2024-07-18, and it's literally iconic. go read some object files, you ate πŸ«Άβœ¨πŸ‘‘

πŸ“¦ where this page comes from