1 llvm-readelf - GNU-style LLVM Object Reader
2 ===========================================
4 .. program:: llvm-readelf
9 :program:`llvm-readelf` [*options*] [*input...*]
14 The :program:`llvm-readelf` tool displays low-level format-specific information
15 about one or more object files.
17 If ``input`` is "``-``", :program:`llvm-readelf` reads from standard
18 input. Otherwise, it will read from the specified ``filenames``.
25 Equivalent to specifying all the main display options relevant to the file
30 Display the address-significance table.
32 .. option:: --arch-specific, -A
34 Display architecture-specific information, e.g. the ARM attributes section on ARM.
36 .. option:: --bb-addr-map
38 Display the contents of the basic block address map section(s), which contain the
39 address of each function, along with the relative offset of each basic block.
41 .. option:: --demangle, -C
43 Display demangled symbol names in the output.
45 .. option:: --dependent-libraries
47 Display the dependent libraries section.
49 .. option:: --dyn-relocations
51 Display the dynamic relocation entries.
53 .. option:: --dyn-symbols, --dyn-syms
55 Display the dynamic symbol table.
57 .. option:: --dynamic-table, --dynamic, -d
59 Display the dynamic table.
61 .. option:: --cg-profile
63 Display the callgraph profile section.
65 .. option:: --histogram, -I
67 Display a bucket list histogram for dynamic symbol hash tables.
69 .. option:: --elf-linker-options
71 Display the linker options section.
73 .. option:: --elf-output-style=<value>
75 Format ELF information in the specified style. Valid options are ``LLVM``,
76 ``GNU``, and ``JSON``. ``LLVM`` output is an expanded and structured format.
77 ``GNU`` (the default) output mimics the equivalent GNU :program:`readelf`
78 output. ``JSON`` is JSON formatted output intended for machine consumption.
80 .. option:: --extra-sym-info
82 Display extra information (section name) when showing symbols.
84 .. option:: --section-groups, -g
86 Display section groups.
88 .. option:: --expand-relocs
90 When used with :option:`--relocations`, display each relocation in an expanded
93 .. option:: --file-header, -h
97 .. option:: --gnu-hash-table
99 Display the GNU hash table for dynamic symbols.
101 .. option:: --hash-symbols
103 Display the expanded hash table with dynamic symbol data.
105 .. option:: --hash-table
107 Display the hash table for dynamic symbols.
109 .. option:: --headers, -e
111 Equivalent to setting: :option:`--file-header`, :option:`--program-headers`,
112 and :option:`--sections`.
116 Display a summary of command line options.
118 .. option:: --hex-dump=<section[,section,...]>, -x
120 Display the specified section(s) as hexadecimal bytes. ``section`` may be a
121 section index or section name.
125 Display information about memory tagging present in the binary. This includes
126 various memtag-specific dynamic entries, decoded global descriptor sections,
127 and decoded Android-specific ELF notes.
129 .. option:: --needed-libs
131 Display the needed libraries.
133 .. option:: --no-demangle
135 Do not display demangled symbol names in the output. On by default.
137 .. option:: --notes, -n
141 .. option:: --pretty-print
143 When used with :option:`--elf-output-style`, JSON output will be formatted in
144 a more readable format.
146 .. option:: --program-headers, --segments, -l
148 Display the program headers.
150 .. option:: --raw-relr
152 Do not decode relocations in RELR relocation sections when displaying them.
154 .. option:: --relocations, --relocs, -r
156 Display the relocation entries in the file.
158 .. option:: --sections, --section-headers, -S
160 Display all sections.
162 .. option:: --section-data
164 When used with :option:`--sections`, display section data for each section
165 shown. This option has no effect for GNU style output.
167 .. option:: --section-details, -t
169 Display all section details. Used as an alternative to :option:`--sections`.
171 .. option:: --section-mapping
173 Display the section to segment mapping.
175 .. option:: --section-relocations
177 When used with :option:`--sections`, display relocations for each section
178 shown. This option has no effect for GNU style output.
180 .. option:: --section-symbols
182 When used with :option:`--sections`, display symbols for each section shown.
183 This option has no effect for GNU style output.
185 .. option:: --stackmap
187 Display contents of the stackmap section.
189 .. option:: --stack-sizes
191 Display the contents of the stack sizes section(s), i.e. pairs of function
192 names and the size of their stack frames. Currently only implemented for GNU
195 .. option:: --string-dump=<section[,section,...]>, -p
197 Display the specified section(s) as a list of strings. ``section`` may be a
198 section index or section name.
200 .. option:: --symbols, --syms, -s
202 Display the symbol table. Also display the dynamic symbol table when using GNU output style for ELF.
204 .. option:: --unwind, -u
206 Display unwind information.
208 .. option:: --version
210 Display the version of the :program:`llvm-readelf` executable.
212 .. option:: --version-info, -V
214 Display version sections.
216 .. option:: --wide, -W
218 Ignored for GNU readelf compatibility. The output is already similar to when using -W with GNU readelf.
222 Read command-line options from response file `<FILE>`.
227 :program:`llvm-readelf` returns 0 under normal operation. It returns a non-zero
228 exit code if there were any errors.
233 :manpage:`llvm-nm(1)`, :manpage:`llvm-objdump(1)`, :manpage:`llvm-readobj(1)`