LLVM-READELF(1)

✨ llvm-readelf ✨

okay bestie, so this is llvm-readelf from the LLVM fam β€” it's the GNU-style LLVM object reader, and it's literally the main character of "what is even inside this object file" πŸ’…

🌸 SYNOPSIS 🌸

llvm-readelf [options] [input…]

πŸ¦‹ DESCRIPTION πŸ¦‹

So llvm-readelf shows you all the low-level, format-specific deets about one or more object files. It's giving x-ray vision into your binaries, no cap πŸ‘‘

If input is -, then llvm-readelf reads from standard input. Otherwise it reads from the filenames you gave it. Simple as that 🫢


πŸŽ€ OPTIONS πŸŽ€

  • --all, -a β€” same as turning on all the main display options that are relevant to the file format. basically "give me everything" energy ✨
  • --addrsig β€” shows the address-significance table.
  • --arch-specific, -A β€” shows architecture-specific info, like the ARM attributes section on ARM.
  • --bb-addr-map β€” shows the contents of the basic block address map section(s), which contain the address of each function plus the relative offset of each basic block.
  • --demangle, -C β€” displays demangled symbol names in the output πŸ™ˆ
  • --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 pick. The valid options are LLVM, GNU, and JSON. LLVM output is an expanded and structured format. GNU (which is the default) output mimics the equivalent GNU readelf output. JSON is JSON formatted output intended for machine consumption πŸ€–
  • --section-groups, -g β€” shows section groups.
  • --expand-relocs β€” when you use it with --relocations, it displays 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 β€” 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.
  • --needed-libs β€” shows the needed libraries.
  • --no-demangle β€” do not display demangled symbol names in the output. This is 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 format.
  • --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, it displays section data for each section shown. Heads up: this option has no effect for GNU style output.
  • --section-details, -t β€” shows all section details. It's used as an alternative to --sections.
  • --section-mapping β€” shows the section to segment mapping.
  • --section-relocations β€” when used with --sections, it displays relocations for each section shown. Also no effect for GNU style output, fyi.
  • --section-symbols β€” when used with --sections, it displays symbols for each section shown. Same deal: no effect for GNU style output.
  • --stackmap β€” shows 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 this one's only implemented for GNU style output 🫠
  • --string-dump=<section[,section,...]>, -p β€” shows the specified section(s) as a list of strings. section can be a section index or a section name.
  • --symbols, --syms, -s β€” shows the symbol table. It also displays the dynamic symbol table when you're 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, 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. (so like, if it's not 0, something went wrong β€” check it πŸ‘€)

🌈 SEE ALSO 🌈

llvm-nm(1), llvm-objdump(1), llvm-readobj(1)

πŸ‘‘ AUTHOR πŸ‘‘

Maintained by the LLVM Team (https://llvm.org/).

2003-2023, LLVM Project


okay that's the whole page bestie, you're officially llvm-readelf-pilled πŸ’…βœ¨

sign-off vibes: this one's page 15 of the manual, dated 2023-07-14, and the tool itself is LLVM-READELF(1) from the LLVM suite β€” go read some object files, you got this πŸŽ€πŸ¦‹πŸ’–

πŸ“¦ where this page comes from