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:: --decompress, -z
43 Dump decompressed section content when used with ``-x`` or ``-p``.
44 If the section(s) are not compressed, they are displayed as is.
46 .. option:: --demangle, -C
48 Display demangled symbol names in the output.
50 .. option:: --dependent-libraries
52 Display the dependent libraries section.
54 .. option:: --dyn-relocations
56 Display the dynamic relocation entries.
58 .. option:: --dyn-symbols, --dyn-syms
60 Display the dynamic symbol table.
62 .. option:: --dynamic-table, --dynamic, -d
64 Display the dynamic table.
66 .. option:: --cg-profile
68 Display the callgraph profile section.
70 .. option:: --histogram, -I
72 Display a bucket list histogram for dynamic symbol hash tables.
74 .. option:: --elf-linker-options
76 Display the linker options section.
78 .. option:: --elf-output-style=<value>
80 Format ELF information in the specified style. Valid options are ``LLVM``,
81 ``GNU``, and ``JSON``. ``LLVM`` output is an expanded and structured format.
82 ``GNU`` (the default) output mimics the equivalent GNU :program:`readelf`
83 output. ``JSON`` is JSON formatted output intended for machine consumption.
85 .. option:: --extra-sym-info
87 Display extra information (section name) when showing symbols.
89 .. option:: --section-groups, -g
91 Display section groups.
93 .. option:: --expand-relocs
95 When used with :option:`--relocations`, display each relocation in an expanded
98 .. option:: --file-header, -h
100 Display file headers.
102 .. option:: --gnu-hash-table
104 Display the GNU hash table for dynamic symbols.
106 .. option:: --hash-symbols
108 Display the expanded hash table with dynamic symbol data.
110 .. option:: --hash-table
112 Display the hash table for dynamic symbols.
114 .. option:: --headers, -e
116 Equivalent to setting: :option:`--file-header`, :option:`--program-headers`,
117 and :option:`--sections`.
121 Display a summary of command line options.
123 .. option:: --hex-dump=<section[,section,...]>, -x
125 Display the specified section(s) as hexadecimal bytes. ``section`` may be a
126 section index or section name.
130 Display information about memory tagging present in the binary. This includes
131 various memtag-specific dynamic entries, decoded global descriptor sections,
132 and decoded Android-specific ELF notes.
134 .. option:: --needed-libs
136 Display the needed libraries.
138 .. option:: --no-demangle
140 Do not display demangled symbol names in the output. On by default.
142 .. option:: --notes, -n
146 .. option:: --pretty-print
148 When used with :option:`--elf-output-style`, JSON output will be formatted in
149 a more readable format.
151 .. option:: --program-headers, --segments, -l
153 Display the program headers.
155 .. option:: --relocations, --relocs, -r
157 Display the relocation entries in the file.
159 .. option:: --sections, --section-headers, -S
161 Display all sections.
163 .. option:: --section-data
165 When used with :option:`--sections`, display section data for each section
166 shown. This option has no effect for GNU style output.
168 .. option:: --section-details, -t
170 Display all section details. Used as an alternative to :option:`--sections`.
172 .. option:: --section-mapping
174 Display the section to segment mapping.
176 .. option:: --section-relocations
178 When used with :option:`--sections`, display relocations for each section
179 shown. This option has no effect for GNU style output.
181 .. option:: --section-symbols
183 When used with :option:`--sections`, display symbols for each section shown.
184 This option has no effect for GNU style output.
186 .. option:: --stackmap
188 Display contents of the stackmap section.
190 .. option:: --stack-sizes
192 Display the contents of the stack sizes section(s), i.e. pairs of function
193 names and the size of their stack frames. Currently only implemented for GNU
196 .. option:: --string-dump=<section[,section,...]>, -p
198 Display the specified section(s) as a list of strings. ``section`` may be a
199 section index or section name.
201 .. option:: --symbols, --syms, -s
203 Display the symbol table. Also display the dynamic symbol table when using GNU output style for ELF.
205 .. option:: --unwind, -u
207 Display unwind information.
209 .. option:: --version
211 Display the version of the :program:`llvm-readelf` executable.
213 .. option:: --version-info, -V
215 Display version sections.
217 .. option:: --wide, -W
219 Ignored for GNU readelf compatibility. The output is already similar to when using -W with GNU readelf.
223 Read command-line options from response file `<FILE>`.
228 :program:`llvm-readelf` returns 0 under normal operation. It returns a non-zero
229 exit code if there were any errors.
234 :manpage:`llvm-nm(1)`, :manpage:`llvm-objdump(1)`, :manpage:`llvm-readobj(1)`