LLVM-READELF(1)
π llvm-readelf β GNU-style LLVM Object Reader β¨
okay bestie, so llvm-readelf is this iconic lil tool that shows you the lowkey deep-down format-specific tea about one or more object files. think of it like the ultimate vibe check for your binaries, no cap π«Ά
πΈ SYNOPSIS πΈ
llvm-readelf [options] [inputβ¦]
π DESCRIPTION π
The llvm-readelf tool displays low-level format-specific information about one or more object files. literally giving you the whole backstory on what's inside those files π
If input is -, llvm-readelf reads from standard input. Otherwise, it will read from the specified filenames. so if you're piping stuff in, just throw a little dash and it knows what's up β¨
π OPTIONS π
--allβ Equivalent to specifying all the main display options relevant to the file format. it's giving "I want EVERYTHING" energy π--addrsigβ Display the address-significance table. lowkey useful, highkey slay π--arch-specific,-Aβ Display architecture-specific information, e.g. the ARM attributes section on ARM. the way that ARM has its own special section... iconic fr fr π¦--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. so it's mapping out where all the basic blocks are, and honestly that's main character energy π--demangle,-Cβ Display demangled symbol names in the output. because nobody wants to read mangled C++ names, periodt π--dyn-relocationsβ Display the dynamic relocation entries. these are the relocations that actually matter at runtime, bestie π₯--dyn-symbols,--dyn-symsβ Display the dynamic symbol table. the symbols that are actually exported, so you know what's visible to the outside world β¨--dynamic-table,--dynamic,-dβ Display the dynamic table. it's giving dynamic linking vibes π--cg-profileβ Display the callgraph profile section. for when you want to see who's calling whom in your code, like the ultimate friendship network π―ββοΈ--histogram,-Iβ Display a bucket list histogram for dynamic symbol hash tables. so it's showing you how the symbols are distributed across buckets, which is lowkey fascinating ngl π--elf-linker-optionsβ Display the linker options section. for when you need to see what the linker was told to do, no cap π--elf-output-style=<value>β Format ELF information in the specified style. Valid options areLLVMandGNU.LLVMoutput is an expanded and structured format, whilstGNU(the default) output mimics the equivalent GNU readelf output. so you can choose between the structured vibe or the classic GNU vibe β both are valid, both are iconic π--section-groups,-gβ Display section groups. grouping sections together because teamwork makes the dream work, periodt π--expand-relocsβ When used with--relocations, display each relocation in an expanded multi-line format. so you get the full story instead of the TL;DR version π--file-header,-hβ Display file headers. the header is like the vibe check of the file, so this is essential bestie π«Ά--gnu-hash-tableβ Display the GNU hash table for dynamic symbols. the GNU hash table is iconic in its own right π--hash-symbolsβ Display the expanded hash table with dynamic symbol data. so you get the hash table and the symbol data all in one, which is efficient and honestly slay β--hash-tableβ Display the hash table for dynamic symbols. just the hash table, no extras, keeping it simple fr fr πΈ--headers,-eβ Equivalent to setting:--file-header,--program-headers, and--sections. it's the combo deal, the all-in-one vibe, and we love that π--helpβ Display a summary of command line options. for when you forget what all these flags do (no judgement, there's a lot) π--hex-dump=<section[,section,...]>,-xβ Display the specified section(s) as hexadecimal bytes. section may be a section index or section name. so you can peek at the raw bytes of whatever section you're curious about, which is giving hacker energy π--needed-libsβ Display the needed libraries. so you know what libraries your binary depends on, like a friend group but for shared objects π―ββοΈ--notes,-nβ Display all notes. notes are those little extra bits of info, and they're lowkey important π--program-headers,--segments,-lβ Display the program headers. these are the headers that tell the loader how to map the file into memory, so they're kinda a big deal π₯--raw-relrβ Do not decode relocations inRELRrelocation sections when displaying them. so you get the raw, undecoded version β use with caution, bestie π¨--relocations,--relocs,-rβ Display the relocation entries in the file. relocations are how the linker fixes up addresses, so this is essential info β¨--sections,--section-headers,-Sβ Display all sections. the sections are like the chapters of your binary's story, and this shows them all π--section-dataβ When used with--sections, display section data for each section shown. This option has no effect for GNU style output. so it's LLVM style only, and it shows you the actual data in each section β highkey useful ngl π--section-details,-tβ Display all section details. Used as an alternative to--sections. so if you want the full tea on every section, this is your vibe π--section-mappingβ Display the section to segment mapping. so you can see which sections belong to which segments, which is lowkey crucial for understanding memory layout πΊοΈ--section-relocationsβ When used with--sections, display relocations for each section shown. This option has no effect for GNU style output. so again, LLVM style only, and it shows you the relocations section by section β¨--section-symbolsβ When used with--sections, display symbols for each section shown. This option has no effect for GNU style output. so you get the symbols grouped by section, which is chef's kiss for debugging π--stackmapβ Display contents of the stackmap section. stackmaps are used by some compilers for garbage collection and other runtime stuff, so they're niche but important π--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. so you get function names and their stack frame sizes, which is lowkey handy for optimization πΈ--string-dump=<section[,section,...]>,-pβ Display the specified section(s) as a list of strings. section may be a section index or section name. so if a section contains strings, this shows them all pretty-like π--symbols,--syms,-sβ Display the symbol table. the symbol table is like the who's who of your binary, so this is essential π--unwind,-uβ Display unwind information. unwind info is how the program unwinds the stack during exceptions, so it's lowkey crucial for debugging π--versionβ Display the version of thellvm-readelfexecutable. always good to know what version you're running, bestie β¨--version-info,-Vβ Display version sections. version info is for symbol versioning, which is a whole vibe in itself π@<FILE>β Read command-line options from response file<FILE>. so you can put all your options in a file and just reference it, which is efficient and honestly slay π
π EXIT STATUS π
llvm-readelf returns 0 under normal operation. It returns a non-zero exit code if there were any errors. so if something went wrong, you'll know β no cap π¨
π¦ SEE ALSO π¦
llvm-nm(1), llvm-objdump(1), llvm-readobj(1)
π AUTHOR π
Maintained by the LLVM Team (https://llvm.org/). they're the ones keeping this whole thing running, and we stan π«Ά
π COPYRIGHT π
2003-2023, LLVM Project
okay bestie, that's the whole vibe of llvm-readelf β it's giving "I know everything about your object files" energy, and honestly? iconic. now go forth and read those ELFs, periodt π
β¨
version 13, dated 2023-07-14 β slay π
π¦ 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