[NFC] Trim trailing whitespace in *.rst
[platform/upstream/llvm.git] / llvm / docs / CommandGuide / llvm-readelf.rst
1 llvm-readelf - GNU-style LLVM Object Reader
2 ===========================================
3
4 .. program:: llvm-readelf
5
6 SYNOPSIS
7 --------
8
9 :program:`llvm-readelf` [*options*] [*input...*]
10
11 DESCRIPTION
12 -----------
13
14 The :program:`llvm-readelf` tool displays low-level format-specific information
15 about one or more object files.
16
17 If ``input`` is "``-``", :program:`llvm-readelf` reads from standard
18 input. Otherwise, it will read from the specified ``filenames``.
19
20 OPTIONS
21 -------
22
23 .. option:: --all, -a
24
25  Equivalent to specifying all the main display options relevant to the file
26  format.
27
28 .. option:: --addrsig
29
30  Display the address-significance table.
31
32 .. option:: --arch-specific, -A
33
34  Display architecture-specific information, e.g. the ARM attributes section on ARM.
35
36 .. option:: --bb-addr-map
37
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.
40
41 .. option:: --demangle, -C
42
43  Display demangled symbol names in the output.
44
45 .. option:: --dependent-libraries
46
47  Display the dependent libraries section.
48
49 .. option:: --dyn-relocations
50
51  Display the dynamic relocation entries.
52
53 .. option:: --dyn-symbols, --dyn-syms
54
55  Display the dynamic symbol table.
56
57 .. option:: --dynamic-table, --dynamic, -d
58
59  Display the dynamic table.
60
61 .. option:: --cg-profile
62
63  Display the callgraph profile section.
64
65 .. option:: --histogram, -I
66
67  Display a bucket list histogram for dynamic symbol hash tables.
68
69 .. option:: --elf-linker-options
70
71  Display the linker options section.
72
73 .. option:: --elf-output-style=<value>
74
75  Format ELF information in the specified style. Valid options are ``LLVM`` and
76  ``GNU``. ``LLVM`` output is an expanded and structured format, whilst ``GNU``
77  (the default) output mimics the equivalent GNU :program:`readelf` output.
78
79 .. option:: --section-groups, -g
80
81  Display section groups.
82
83 .. option:: --expand-relocs
84
85  When used with :option:`--relocations`, display each relocation in an expanded
86  multi-line format.
87
88 .. option:: --file-header, -h
89
90  Display file headers.
91
92 .. option:: --gnu-hash-table
93
94  Display the GNU hash table for dynamic symbols.
95
96 .. option:: --hash-symbols
97
98  Display the expanded hash table with dynamic symbol data.
99
100 .. option:: --hash-table
101
102  Display the hash table for dynamic symbols.
103
104 .. option:: --headers, -e
105
106  Equivalent to setting: :option:`--file-header`, :option:`--program-headers`,
107  and :option:`--sections`.
108
109 .. option:: --help
110
111  Display a summary of command line options.
112
113 .. option:: --hex-dump=<section[,section,...]>, -x
114
115  Display the specified section(s) as hexadecimal bytes. ``section`` may be a
116  section index or section name.
117
118 .. option:: --needed-libs
119
120  Display the needed libraries.
121
122 .. option:: --no-demangle
123
124  Do not display demangled symbol names in the output. On by default.
125
126 .. option:: --notes, -n
127
128  Display all notes.
129
130 .. option:: --program-headers, --segments, -l
131
132  Display the program headers.
133
134 .. option:: --raw-relr
135
136  Do not decode relocations in RELR relocation sections when displaying them.
137
138 .. option:: --relocations, --relocs, -r
139
140  Display the relocation entries in the file.
141
142 .. option:: --sections, --section-headers, -S
143
144  Display all sections.
145
146 .. option:: --section-data
147
148  When used with :option:`--sections`, display section data for each section
149  shown. This option has no effect for GNU style output.
150
151 .. option:: --section-details, -t
152
153  Display all section details. Used as an alternative to :option:`--sections`.
154
155 .. option:: --section-mapping
156
157  Display the section to segment mapping.
158
159 .. option:: --section-relocations
160
161  When used with :option:`--sections`, display relocations for each section
162  shown. This option has no effect for GNU style output.
163
164 .. option:: --section-symbols
165
166  When used with :option:`--sections`, display symbols for each section shown.
167  This option has no effect for GNU style output.
168
169 .. option:: --stackmap
170
171  Display contents of the stackmap section.
172
173 .. option:: --stack-sizes
174
175  Display the contents of the stack sizes section(s), i.e. pairs of function
176  names and the size of their stack frames. Currently only implemented for GNU
177  style output.
178
179 .. option:: --string-dump=<section[,section,...]>, -p
180
181  Display the specified section(s) as a list of strings. ``section`` may be a
182  section index or section name.
183
184 .. option:: --symbols, --syms, -s
185
186  Display the symbol table. Also display the dynamic symbol table when using GNU output style for ELF.
187
188 .. option:: --unwind, -u
189
190  Display unwind information.
191
192 .. option:: --version
193
194  Display the version of the :program:`llvm-readelf` executable.
195
196 .. option:: --version-info, -V
197
198  Display version sections.
199
200 .. option:: --wide, -W
201
202  Ignored for GNU readelf compatibility. The output is already similar to when using -W with GNU readelf.
203
204 .. option:: @<FILE>
205
206  Read command-line options from response file `<FILE>`.
207
208 EXIT STATUS
209 -----------
210
211 :program:`llvm-readelf` returns 0 under normal operation. It returns a non-zero
212 exit code if there were any errors.
213
214 SEE ALSO
215 --------
216
217 :manpage:`llvm-nm(1)`, :manpage:`llvm-objdump(1)`, :manpage:`llvm-readobj(1)`