LLVM-READOBJ(1)
π 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-readelfusesGNUfor the--elf-output-styleoption by default.llvm-readobjusesLLVM. different defaults, different girls πllvm-readelflets you do single-letter grouped flags (likellvm-readelf -SWis the same asllvm-readelf -S -W).llvm-readobjdoes not allow grouping. no grouping, no bundling, periodt βllvm-readelfgives you-sas an alias for--symbols, for GNU readelf compatibility β whereas inllvm-readobj,-sis an alias for--section-headers. same letter, different destiny πllvm-readobjprovides-tas an alias for--symbols.llvm-readelfdoes not. she said no πllvm-readobjprovides--sr,--sd,--stand--dtas aliases for--section-relocations,--section-data,--section-symbolsand--dyn-symbolsrespectively.llvm-readelfdoes 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 arenameandtype.--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 thellvm-readobjexecutable.@<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 areLLVM,GNU, andJSON.LLVMoutput (the default) is an expanded and structured format.GNUoutput mimics the equivalent GNU readelf output.JSONis 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.relocsection.--coff-debug-directoryβ display the debug directory.--coff-tls-directoryβ display the TLS directory.--coff-directivesβ display the.drectvesection.--coff-exportsβ display the export table.--coff-importsβ display the import table.--coff-load-configβ display the load config.--coff-resourcesβ display the.rsrcsection.
π 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.
π COPYRIGHT π
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
- ubuntu noble: llvm-16 1:16.0.6-23ubuntu4 Β· APACHE-2-LLVM-EXCEPTIONS
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms