LLVM-READOBJ(1)
π llvm-readobj β the LLVM Object Reader, bestie edition
okay so this is a page from the LLVM manual set (yep, that LLVM π) and it's literally all about peeking inside object files. let's go π
β¨ SYNOPSIS β¨
llvm-readobj [options] [inputβ¦]
π¦ DESCRIPTION π¦
so llvm-readobj is this iconic little tool that displays low-level, format-specific info about one or more object files. like, it shows you the guts. no cap π₯
and listen: if input is -, then llvm-readobj reads from standard input. otherwise it reads from the filenames you gave it. simple as that π«Ά
πΈ DIFFERENCES TO LLVM-READELF πΈ
so llvm-readelf is an alias for the llvm-readobj tool, but with a slightly different command-line interface and output that's GNU compatible. and here's the list of how they 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.llvm-readelfprovides-sas an alias for--symbols, for GNU readelf compatibility, whereas it's an alias for--section-headersinllvm-readobj. (yes this is a whole thing π)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.
β¨ GENERAL AND MULTI-FORMAT OPTIONS β¨
these ones work across more than one file format, or they're just not about file formats at all π«
--allβ equivalent to specifying all the main display options relevant to the file format. the "give me everything" move π--addrsigβ display the address-significance table.--expand-relocsβ when used with--relocs, display each relocation in an expanded multi-line format. so roomy β¨--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.--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 (just so you know π«Ά).--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.--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 π§
these ones are implemented only for the ELF file format, iykyk π
--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.--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 areLLVMandGNU.LLVMoutput (the default) is an expanded and structured format, whilstGNUoutput mimics the equivalent GNU readelf output.--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 π
only for the Mach-O file format, bestie π
--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 β
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.
π EXIT STATUS π
llvm-readobj returns 0 under normal operation. it returns a non-zero exit code if there were any errors. (so like, 0 = slay, non-zero = something went off π)
π SEE ALSO π
llvm-nm(1), llvm-objdump(1), llvm-readelf(1)
π AUTHOR π
maintained by the LLVM Team (https://llvm.org/). iconic behavior, honestly π«Ά
π COPYRIGHT π
2003-2023, LLVM Project
okay that's the whole page, bestie, go forth and read some objects π β¨
signed off with love β this was LLVM manual page, version 13, dated 2023-07-14 π¦
π¦ where this page comes from
- ubuntu jammy: llvm-13 1:13.0.1-2ubuntu2.2 Β· APACHE-2-LLVM-EXCEPTIONS
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms