LLVM-READOBJ(1)

πŸ“¦
version 16.0.6 Β· 3 versions
, in ubuntu noble

πŸ’– LLVM-READOBJ β€” the manual page, but make it a group chat πŸ’–

okay so bestie, welcome to LLVM-READOBJ(1) β€” that's section 1 of the manual, LLVM fam, and this lil tool is literally the object file reader of your dreams. let's get into it πŸ¦‹


✨ NAME ✨

llvm-readobj β€” LLVM Object Reader. she reads objects. that's the whole thing. iconic behavior πŸ’…


πŸŽ€ SYNOPSIS πŸŽ€

llvm-readobj [options] [input…]

🌸 DESCRIPTION 🌸

so llvm-readobj is the girl who shows you all the low-level, format-specific deets about one or more object files. like, she's not gonna give you vibes, she's gonna give you facts. nerd-coded in the best way possible πŸ”₯

and here's the cute part: if an input is -, llvm-readobj reads from standard input. otherwise? she reads from the filenames you gave her. simple as that 🫢


πŸ¦‹ DIFFERENCES TO LLVM-READELF πŸ¦‹

okay so plot twist: 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. and the differences between llvm-readelf and llvm-readobj are giving sibling energy. here's the list:

  • llvm-readelf uses GNU for the --elf-output-style option by default. llvm-readobj uses LLVM. different defaults, different girls πŸ’œ
  • 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. no grouping, no bundling, periodt βœ‹
  • llvm-readelf gives you -s as an alias for --symbols, for GNU readelf compatibility β€” whereas in llvm-readobj, -s is an alias for --section-headers. same letter, different destiny 😭
  • llvm-readobj provides -t as an alias for --symbols. llvm-readelf does not. she said no πŸ’€
  • 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 β€” and that's on purpose, to avoid conflicting with grouped flags. considerate queen πŸ‘‘

🌈 GENERAL AND MULTI-FORMAT OPTIONS 🌈

these options work on more than one file format, or honestly they're just not about file formats at all. generalist icons:

  • --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. spread out, comfy, readable.
  • --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. hex girlies rise 🧚
  • --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.
  • --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 stans, this is your moment:

  • --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. we love a name that actually reads 😌
  • --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. pick your aesthetic πŸ’…
  • --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 eyeballs ✨
  • --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 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 ⭐

these 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 πŸ‘‘

and these 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. she returns a non-zero exit code if there were any errors. so like, 0 = slay, anything else = something went wrong bestie 😭


🌟 SEE ALSO 🌟

llvm-nm(1), llvm-objdump(1), llvm-readelf(1) β€” go read those too, they're all in the family 🫢


πŸ’– AUTHOR πŸ’–

maintained by the LLVM Team (https://llvm.org/). they're doing the lord's work fr fr.


2003-2024, LLVM Project


okay that's the whole page!! and for the little sign-off moment: this was LLVM-READOBJ(1), version 15, dated 2024-04-14, and honestly? she ate. go read some object files, bestie πŸ’…βœ¨πŸ¦‹

πŸ“¦ where this page comes from