LLVM-READOBJ(1)
π LLVM-READOBJ π
okay bestie, welcome to the llvm-readobj page, section 1 of the LLVM manual π«Ά this is the tool that spills ALL the tea about what's actually inside your object files, at the lowest, nerdiest, most format-specific level. no cap.
β¨ NAME β¨
llvm-readobj β LLVM Object Reader. she reads objects. that's it. that's the job. π
β¨ SYNOPSIS β¨
llvm-readobj [options] [input...]
β¨ DESCRIPTION β¨
The llvm-readobj tool displays low-level format-specific information about one or more object files. like, the guts guts. π
If input is -, llvm-readobj reads from standard input. Otherwise, it will read from the specified filenames.
β¨ DIFFERENCES TO LLVM-READELF β¨
so llvm-readelf is literally just an alias for the llvm-readobj tool, but with a slightly different command-line interface and output that is GNU compatible. here's the rundown of how the two sisters differ, bestie:
llvm-readelfusesGNUfor the--elf-output-styleoption by default.llvm-readobjusesLLVM.llvm-readelfallows single-letter grouped flags (e.g.llvm-readelf -SWis the same asllvm-readelf -S -W).llvm-readobjdoes not allow grouping. grouping is a readelf-only slay, sorry.llvm-readelfprovides-sas an alias for--symbols, for GNU readelf compatibility, whereas it is an alias for--section-headersinllvm-readobj. yeah. the same letter means two different things. iconic but also chaotic πllvm-readobjprovides-tas an alias for--symbols.llvm-readelfdoes not.llvm-readobjprovides--sr,--sd,--stand--dtas aliases for--section-relocations,--section-data,--section-symbolsand--dyn-symbolsrespectively.llvm-readelfdoes not provide these aliases, to avoid conflicting with grouped flags. makes sense honestly.
β¨ GENERAL AND MULTI-FORMAT OPTIONS β¨
These options are applicable to more than one file format, or are unrelated to file formats. the universal besties. π
--allβ Equivalent to specifying all the main display options relevant to the file format. go big or go home.--addrsigβ Display the address-significance table.--decompress,-zβ Dump decompressed section content when used with-xor-p. If the section(s) are not compressed, they are displayed as is. no unzipping required, they're already serving.--demangle,-Cβ Display demangled symbol names in the output. This option is only for ELF and XCOFF file formats.--expand-relocsβ When used with--relocs, display each relocation in an expanded multi-line format. room to breathe β¨--file-header,-hβ Display file headers.--headers,-eβ Equivalent to setting:--file-header,--program-headers, and--sections. the combo meal.--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.--memtagβ Display information about memory tagging present in the binary. This includes various memtag-specific dynamic entries, decoded global descriptor sections, and decoded Android-specific ELF notes.--needed-libsβ Display the needed libraries.--no-demangleβ Do not demangle symbol names in the output. This option is only for ELF and XCOFF file formats. The option is enabled by default.--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 girlies, 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. When pgo analysis maps are present, all analyses are printed as their raw value.--pretty-pgo-analysis-mapβ When pgo analysis maps are present in the basic block address map section(s), analyses with special formats (i.e.BlockFrequency,BranchProbability, etc) are printed using the same format as their respective analysis pass. Requires--bb-addr-mapto have an effect. no--bb-addr-map, no glamour. π--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.--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.--memtagβ Display information about memory tagging present in the binary. This includes various dynamic entries, decoded global descriptor sections, and decoded Android-specific ELF notes.--notes,-nβ Display all notes.--pretty-printβ When used with--elf-output-style,JSONoutput will be formatted in a more readable format.--program-headers,--segments,-lβ Display the program headers.--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 hive rise up π
--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, this one's for 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.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 β¨
The following options are implemented only for the XCOFF file format. niche, but she ate. π₯
--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. It returns a non-zero exit code if there were any errors. so like, 0 is the vibe check passing, anything else means something went off and you gotta look into it π
β¨ SEE ALSO β¨
llvm-nm(1), llvm-objdump(1), llvm-readelf(1) β go read those too, they're all part of the same friend group π«Ά
β¨ AUTHOR β¨
Maintained by the LLVM Team (https://llvm.org/).
β¨ COPYRIGHT β¨
2003-2025, LLVM Project
and that's the whole page, bestie! πΈ this one's from the LLVM project, version 20, dated 2025-09-03, and it's giving main character energy from start to finish. go read some object files, you absolute icon πβ¨
π¦ where this page comes from
- fedora 43: llvm20 20.1.8-2.fc43 Β· Apache-2.0 WITH LLVM-exception OR NCSA
- fedora 43: llvm20 20.1.8-2.fc43 Β· Apache-2.0 WITH LLVM-exception OR NCSA
- fedora 44: llvm20 20.1.8-2.fc44 Β· Apache-2.0 WITH LLVM-exception OR NCSA
- fedora 44: llvm20 20.1.8-2.fc44 Β· Apache-2.0 WITH LLVM-exception OR NCSA
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms