LLVM-READELF(1)

๐Ÿ’… LLVM-READELF(1) ๐Ÿ’…

okay so bestie, this is a page from the LLVM manual set โ€” yes, that LLVM โ€” and it's all about llvm-readelf, the GNU-style object reader. pull up a chair, we're getting into it ๐Ÿซถ


โœจ NAME โœจ

llvm-readelf โ€” the GNU-style LLVM object reader, aka the lil tool that spills the tea on your object files ๐Ÿ’…


๐ŸŒธ SYNOPSIS ๐ŸŒธ

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

๐Ÿฆ‹ DESCRIPTION ๐Ÿฆ‹

so llvm-readelf shows you low-level, format-specific info about one or more object files. it's giving x-ray vision for binaries, no cap ๐Ÿ”ฅ

and if input is -, it reads from standard input. otherwise? it reads from the filenames you gave it, periodt.


๐ŸŽ€ OPTIONS ๐ŸŽ€

  • --all, -a โ€” literally the "give me everything" option: same as spelling out all the main display options that are relevant to whatever file format you're looking at ๐Ÿ‘‘
  • --addrsig โ€” shows the address-significance table โœจ
  • --arch-specific, -A โ€” shows architecture-specific info, like the ARM attributes section on ARM ๐Ÿฆ‹
  • --bb-addr-map โ€” shows what's inside the basic block address map section(s) โ€” those contain the address of each function plus the relative offset of each basic block ๐Ÿ“
  • --decompress, -z โ€” dumps the decompressed section content when you use it with -x or -p. if the section(s) weren't compressed in the first place, they just get displayed as-is, no drama ๐Ÿ’œ
  • --demangle, -C โ€” shows demangled symbol names in the output (the readable ones, bestie ๐Ÿ˜Œ)
  • --dependent-libraries โ€” shows the dependent libraries section ๐Ÿ“
  • --dyn-relocations โ€” shows the dynamic relocation entries ๐ŸŒˆ
  • --dyn-symbols, --dyn-syms โ€” shows the dynamic symbol table โญ
  • --dynamic-table, --dynamic, -d โ€” shows the dynamic table ๐Ÿ’ซ
  • --cg-profile โ€” shows the callgraph profile section ๐Ÿ“Š
  • --histogram, -I โ€” shows a bucket list histogram for dynamic symbol hash tables ๐Ÿชฃ
  • --elf-linker-options โ€” shows the linker options section ๐Ÿ”—
  • --elf-output-style=<value> โ€” formats ELF info in the style you picked. valid values are LLVM, GNU, and JSON. LLVM is an expanded, structured format. GNU (which is the default) mimics the equivalent GNU readelf output. JSON is JSON formatted output, intended for machines to consume ๐Ÿค–
  • --extra-sym-info โ€” shows extra info (the section name) when showing symbols ๐Ÿ‘€
  • --section-groups, -g โ€” shows section groups ๐Ÿงš
  • --expand-relocs โ€” when used with --relocations, shows each relocation in an expanded, multi-line format ๐Ÿ“œ
  • --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 โ€” same as setting --file-header, --program-headers, and --sections all at once ๐Ÿ’ฅ
  • --help โ€” shows a summary of the 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 ๐Ÿ”ค
  • --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 ๐Ÿท๏ธ
  • --needed-libs โ€” shows the needed libraries ๐Ÿ“š
  • --no-demangle โ€” does not show demangled symbol names in the output. on by default ๐Ÿ™ˆ
  • --notes, -n โ€” shows all notes ๐Ÿ“
  • --pretty-print โ€” when used with --elf-output-style, the JSON output gets formatted in a more readable way ๐Ÿ’–
  • --program-headers, --segments, -l โ€” shows the program headers ๐Ÿงฉ
  • --raw-relr โ€” does not decode relocations in RELR relocation sections when displaying them ๐Ÿชจ
  • --relocations, --relocs, -r โ€” shows the relocation entries in the file ๐Ÿ”„
  • --sections, --section-headers, -S โ€” shows all sections ๐Ÿงฑ
  • --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-mapping โ€” shows the section to segment mapping ๐Ÿ—บ๏ธ
  • --section-relocations โ€” when used with --sections, shows relocations for each section shown. again: no effect for GNU style output โš ๏ธ
  • --section-symbols โ€” when used with --sections, shows symbols for each section shown. and again: 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. ngl, currently only implemented for GNU style output ๐Ÿซถ
  • --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. it also shows the dynamic symbol table when you're using GNU output style for ELF ๐Ÿ” 
  • --unwind, -u โ€” shows unwind information ๐ŸŒ€
  • --version โ€” shows the version of the llvm-readelf executable ๐Ÿท๏ธ
  • --version-info, -V โ€” shows version sections ๐Ÿ“ฆ
  • --wide, -W โ€” ignored for GNU readelf compatibility. the output is already similar to when you use -W with GNU readelf ๐Ÿ’€
  • @<FILE> โ€” reads command-line options from the response file <FILE> ๐Ÿ“„

โญ EXIT STATUS โญ

llvm-readelf returns 0 under normal operation. it returns a non-zero exit code if there were any errors ๐Ÿ˜ญ


๐Ÿ”ฅ SEE ALSO ๐Ÿ”ฅ


๐Ÿ’œ Author ๐Ÿ’œ

maintained by the LLVM Team (https://llvm.org/) โ€” icons, the whole squad ๐Ÿซถ


2003-2026, LLVM Project


and that's the whole page, bestie ๐ŸŽ€ version 15, dated 2026-09-09, filed under LLVM-READELF(1) โ€” go forth and read those ELF files, you absolute icon ๐Ÿ‘‘โœจ

๐Ÿ“ฆ where this page comes from