LLVM-READELF(1)

๐Ÿ’… llvm-readelf โ€” bestie's guide to the GNU-style LLVM Object Reader ๐ŸŽ€

okay so real talk: this is the llvm-readelf page from the LLVM manual, and I'm gonna walk you through it like we're texting at 1am. it's the GNU-style object reader, and honestly? she's iconic. โœจ


โœจ SYNOPSIS โœจ

llvm-readelf [options] [input...]

๐ŸŒธ DESCRIPTION ๐ŸŒธ

so llvm-readelf literally just shows you low-level, format-specific info about one or more object files. that's the whole vibe. ๐Ÿซถ

and here's the cute part: if input is -, llvm-readelf reads from standard input instead of a file. otherwise it reads from the filenames you gave it. no cap.


๐Ÿ’– OPTIONS ๐Ÿ’–

okay buckle up bestie, there's a LOT of them. but they're all here, I promise. ๐Ÿ‘‘

  • --addrsig โ€” shows the address-significance table. periodt.
  • --all, -a โ€” the "give me everything" flag. it's equivalent to specifying all the main display options relevant to the file format. main character energy fr.
  • --arch-specific, -A โ€” shows architecture-specific info, like the ARM attributes section on ARM. iykyk.
  • --bb-addr-map โ€” shows the contents of the basic block address map section(s) โ€” those contain the address of each function plus the relative offset of each basic block. slay.
  • --call-graph-info โ€” shows the call graph section entries. for each function you get its identifying info, each of its direct callees' info, and for each indirect callee a 64-bit number representing that callee's function signature. you can use all of it to reconstruct the program call graph. lowkey powerful. ๐Ÿ”ฅ
  • --cg-profile โ€” shows the callgraph profile section.
  • --decompress, -z โ€” dumps decompressed section content when used with -x or -p. and if the section(s) aren't compressed? they're displayed as is. no drama. ๐ŸŒธ
  • --demangle, -C โ€” shows demangled symbol names in the output. thank god.
  • --dependent-libraries โ€” shows the dependent libraries section.
  • --dynamic-table, --dynamic, -d โ€” shows the dynamic table.
  • --dyn-relocations โ€” shows the dynamic relocation entries.
  • --dyn-symbols, --dyn-syms โ€” shows the dynamic symbol table.
  • --elf-linker-options โ€” shows the linker options section.
  • --elf-output-style=<value> โ€” formats the ELF info in whatever style you pick. valid options are LLVM, GNU, and JSON. LLVM output is an expanded and structured format. GNU (the default) mimics the equivalent GNU readelf output. JSON is JSON formatted output intended for machine consumption. three aesthetics, one flag ๐Ÿ’…
  • --extra-sym-info โ€” shows extra info (the section name) when showing symbols.
  • --expand-relocs โ€” when used with --relocations, shows each relocation in an expanded multi-line format. so roomy.
  • --file-header, -h โ€” shows file headers.
  • --gnu-hash-table โ€” shows the GNU hash table for dynamic symbols.
  • --hash-symbols โ€” shows the expanded hash table with dynamic symbol data.
  • --hash-table โ€” shows the hash table for dynamic symbols.
  • --headers, -e โ€” equivalent to setting --file-header, --program-headers, and --sections all at once. combo meal ๐Ÿ“
  • --help โ€” displays a summary of command line options.
  • --hex-dump=<section[,section,...]>, -x โ€” shows the specified section(s) as hexadecimal bytes. section can be a section index or a section name.
  • --histogram, -I โ€” shows a bucket list histogram for dynamic symbol hash tables.
  • --memtag โ€” shows info about memory tagging present in the binary. this includes various memtag-specific dynamic entries, decoded global descriptor sections, and decoded Android-specific ELF notes. very niche, very cute ๐Ÿฆ‹
  • --needed-libs โ€” shows the needed libraries.
  • --no-demangle โ€” does NOT show demangled symbol names in the output. on by default, bestie.
  • --notes, -n โ€” shows all notes.
  • --offloading โ€” shows the list of HIP offload bundles.
  • --pretty-print โ€” when used with --elf-output-style, the JSON output gets formatted in a more readable way. glow-up for your JSON โœจ
  • --program-headers, --segments, -l โ€” shows the program headers.
  • --relocations, --relocs, -r โ€” shows the relocation entries in the file.
  • --section-data โ€” when used with --sections, shows section data for each section shown. heads up: this option has no effect for GNU style output. ๐Ÿ™ˆ
  • --section-details, -t โ€” shows all section details. used as an alternative to --sections.
  • --section-groups, -g โ€” shows section groups.
  • --section-mapping โ€” shows the section to segment mapping.
  • --section-relocations โ€” when used with --sections, shows relocations for each section shown. again, this option has no effect for GNU style output.
  • --sections, --section-headers, -S โ€” shows all sections.
  • --section-symbols โ€” when used with --sections, shows symbols for each section shown. and yes, same deal: no effect for GNU style output.
  • --stackmap โ€” shows the contents of the stackmap section.
  • --stack-sizes โ€” shows 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 โ€” don't come for her, she's doing her best ๐Ÿ’€
  • --string-dump=<section[,section,...]>, -p โ€” shows the specified section(s) as a list of strings. section may be a section index or a section name.
  • --symbols, --syms, -s โ€” shows the symbol table. also shows the dynamic symbol table when using GNU output style for ELF.
  • --unwind, -u โ€” shows unwind information.
  • --version โ€” displays the version of the llvm-readelf executable.
  • --version-info, -V โ€” shows version sections.
  • --wide, -W โ€” ignored, purely for GNU readelf compatibility. the output is already similar to when you use -W with GNU readelf. she already ate, basically ๐Ÿ‘‘
  • @<FILE> โ€” reads command-line options from the response file <FILE>.

๐Ÿฆ‹ EXIT STATUS ๐Ÿฆ‹

llvm-readelf returns 0 under normal operation. but if there were any errors, it returns a non-zero exit code. so like, keep an eye on it. ๐Ÿ˜ญ

๐ŸŽ€ SEE ALSO ๐ŸŽ€


๐Ÿ’œ Author ๐Ÿ’œ

maintained by the LLVM Team (https://llvm.org/). absolute icons, fr fr.

2003-2026, LLVM Project


okay that's the whole page bestie, you're officially a llvm-readelf expert ๐Ÿงš this was LLVM, dated 2026-10-20, page 23 โ€” mwah, go read some object files ๐Ÿ’…๐Ÿ’–

๐Ÿ“ฆ where this page comes from
  • arch rolling: llvm 23.1.4-1 ยท Apache-2.0 WITH LLVM-exception
  • ๐Ÿ’– girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms