LLVM-READELF(1)

πŸ“¦
version 16.0.6 Β· 3 versions
, in ubuntu noble

πŸ’– LLVM-READELF πŸ’–

okay bestie, so this is llvm-readelf, aka the GNU-style LLVM Object Reader. it's the little icon that lives in the LLVM manual pages πŸ‘‘ and it's here to spill all the lowkey format-specific tea about your object files.


✨ SYNOPSIS ✨

llvm-readelf [options] [input…]

πŸ¦‹ DESCRIPTION πŸ¦‹

llvm-readelf shows you low-level, format-specific information about one or more object files. it's giving x-ray vision, honestly πŸ”₯

if an input is -, llvm-readelf reads from standard input instead. otherwise it reads from the filenames you handed it, one by one. simple as that πŸ’…


πŸŽ€ OPTIONS πŸŽ€

  • --all, -a β€” the "give me everything" button. equivalent to specifying all the main display options that are relevant to the file format. no cap, it's a lot.
  • --addrsig β€” display the address-significance table ✨
  • --arch-specific, -A β€” display architecture-specific info. like, for example, the ARM attributes section on ARM 🧚
  • --bb-addr-map β€” display the contents of the basic block address map section(s). those hold the address of each function plus the relative offset of each basic block πŸ—ΊοΈ
  • --demangle, -C β€” display demangled symbol names in the output. let those names breathe, bestie 🫢
  • --dependent-libraries β€” display the dependent libraries section πŸ“š
  • --dyn-relocations β€” display the dynamic relocation entries πŸ”„
  • --dyn-symbols, --dyn-syms β€” 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. we love a distribution moment πŸ’œ
  • --elf-linker-options β€” display the linker options section πŸ”—
  • --elf-output-style=<value> β€” format the ELF info in the style you want. valid options 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 machine consumption πŸ€–
  • --section-groups, -g β€” display section groups πŸ«‚
  • --expand-relocs β€” when you use it with --relocations, each relocation gets displayed in an expanded multi-line format πŸ“œ
  • --file-header, -h β€” display file headers πŸ“„
  • --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 πŸ”’
  • --headers, -e β€” equivalent to setting --file-header, --program-headers, and --sections all at once. combo move 🎯
  • --help β€” display a summary of command line options. the classic πŸ†˜
  • --hex-dump=<section[,section,...]>, -x β€” display the specified section(s) as hexadecimal bytes. section can be a section index or a section name πŸ”’
  • --needed-libs β€” display the needed libraries 🧩
  • --no-demangle β€” do not display demangled symbol names in the output. this one is on by default.
  • --notes, -n β€” display all notes πŸ—’οΈ
  • --pretty-print β€” when you use it with --elf-output-style, the JSON output gets formatted in a more readable way. aesthetic ✨
  • --program-headers, --segments, -l β€” display the program headers πŸ“‹
  • --raw-relr β€” do not decode relocations in RELR relocation sections when displaying them πŸ™…
  • --relocations, --relocs, -r β€” display the relocation entries in the file 🚚
  • --sections, --section-headers, -S β€” display all sections 🧱
  • --section-data β€” when you use it with --sections, display section data for each section shown. heads up: this option has no effect for GNU style output πŸ’€
  • --section-details, -t β€” display all section details. used as an alternative to --sections πŸ”
  • --section-mapping β€” display the section to segment mapping 🧭
  • --section-relocations β€” when you use it with --sections, display relocations for each section shown. again: no effect for GNU style output πŸ’€
  • --section-symbols β€” when you use it with --sections, display symbols for each section shown. and yes, same deal: no effect for GNU style output πŸ’€
  • --stackmap β€” display contents of the stackmap section πŸ—ΊοΈ
  • --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 πŸ“
  • --string-dump=<section[,section,...]>, -p β€” display the specified section(s) as a list of strings. section can be a section index or a section name πŸ”€
  • --symbols, --syms, -s β€” display the symbol table. it also displays the dynamic symbol table when you're using GNU output style for ELF πŸ‘‘
  • --unwind, -u β€” display unwind information πŸŒ€
  • --version β€” display the version of the llvm-readelf executable 🏷️
  • --version-info, -V β€” display version sections πŸ“Œ
  • --wide, -W β€” ignored, for GNU readelf compatibility. the output is already similar to what you'd get using -W with GNU readelf, so like, it's fine bestie 😌
  • @<FILE> β€” read 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. so if you see a non-zero, something went wrong, fr fr 😭


🌈 SEE ALSO 🌈

llvm-nm(1), llvm-objdump(1), llvm-readobj(1) β€” go read those too, iykyk πŸ’œ


πŸ‘‘ AUTHOR πŸ‘‘

maintained by the LLVM Team (https://llvm.org/). they're the main characters, honestly 🫢


2003-2024, LLVM Project


and that's the whole vibe check, bestie!! this page is from the LLVM manual, version 15, dated 2024-04-14 ✨ slay, go read some object files, periodt πŸ’…πŸŒΈ
πŸ“¦ where this page comes from