blob: fa54c1dc84dc45e153857b071414334666ca781b [file] [log] [blame]
James Henderson90c57e02019-07-01 16:18:57 +00001llvm-readelf - GNU-style LLVM Object Reader
2===========================================
3
4.. program:: llvm-readelf
5
6SYNOPSIS
7--------
8
9:program:`llvm-readelf` [*options*] [*input...*]
10
11DESCRIPTION
12-----------
13
14The :program:`llvm-readelf` tool displays low-level format-specific information
15about one or more object files.
16
Elvina Yakubovadf952cb2020-07-20 08:47:11 +010017If ``input`` is "``-``", :program:`llvm-readelf` reads from standard
James Henderson90c57e02019-07-01 16:18:57 +000018input. Otherwise, it will read from the specified ``filenames``.
19
20OPTIONS
21-------
22
23.. option:: --all
24
25 Equivalent to specifying all the main display options.
26
27.. option:: --addrsig
28
29 Display the address-significance table.
30
Fangrui Song2d92c882019-10-01 01:31:15 +000031.. option:: --arch-specific, -A
James Henderson90c57e02019-07-01 16:18:57 +000032
Fangrui Song2d92c882019-10-01 01:31:15 +000033 Display architecture-specific information, e.g. the ARM attributes section on ARM.
James Henderson90c57e02019-07-01 16:18:57 +000034
35.. option:: --color
36
37 Use colors in the output for warnings and errors.
38
39.. option:: --demangle, -C
40
41 Display demangled symbol names in the output.
42
43.. option:: --dyn-relocations
44
45 Display the dynamic relocation entries.
46
47.. option:: --dyn-symbols, --dyn-syms
48
49 Display the dynamic symbol table.
50
51.. option:: --dynamic-table, --dynamic, -d
52
53 Display the dynamic table.
54
Zequan Wubbf89642020-06-15 10:21:47 -070055.. option:: --cg-profile
James Henderson90c57e02019-07-01 16:18:57 +000056
57 Display the callgraph profile section.
58
59.. option:: --elf-hash-histogram, --histogram, -I
60
61 Display a bucket list histogram for dynamic symbol hash tables.
62
63.. option:: --elf-linker-options
64
65 Display the linker options section.
66
67.. option:: --elf-output-style=<value>
68
James Hendersonb52a0c02019-07-08 15:46:26 +000069 Format ELF information in the specified style. Valid options are ``LLVM`` and
James Henderson90c57e02019-07-01 16:18:57 +000070 ``GNU``. ``LLVM`` output is an expanded and structured format, whilst ``GNU``
71 (the default) output mimics the equivalent GNU :program:`readelf` output.
72
73.. option:: --elf-section-groups, --section-groups, -g
74
75 Display section groups.
76
77.. option:: --expand-relocs
78
79 When used with :option:`--relocations`, display each relocation in an expanded
80 multi-line format.
81
82.. option:: --file-headers, -h
83
84 Display file headers.
85
86.. option:: --gnu-hash-table
87
88 Display the GNU hash table for dynamic symbols.
89
90.. option:: --hash-symbols
91
James Hendersonb52a0c02019-07-08 15:46:26 +000092 Display the expanded hash table with dynamic symbol data.
James Henderson90c57e02019-07-01 16:18:57 +000093
94.. option:: --hash-table
95
96 Display the hash table for dynamic symbols.
97
98.. option:: --headers, -e
99
100 Equivalent to setting: :option:`--file-headers`, :option:`--program-headers`,
101 and :option:`--sections`.
102
103.. option:: --help
104
105 Display a summary of command line options.
106
107.. option:: --help-list
108
109 Display an uncategorized summary of command line options.
110
111.. option:: --hex-dump=<section[,section,...]>, -x
112
113 Display the specified section(s) as hexadecimal bytes. ``section`` may be a
114 section index or section name.
115
116.. option:: --needed-libs
117
118 Display the needed libraries.
119
120.. option:: --notes, -n
121
122 Display all notes.
123
124.. option:: --program-headers, --segments, -l
125
126 Display the program headers.
127
128.. option:: --raw-relr
129
130 Do not decode relocations in RELR relocation sections when displaying them.
131
132.. option:: --relocations, --relocs, -r
133
134 Display the relocation entries in the file.
135
136.. option:: --sections, --section-headers, -S
137
138 Display all sections.
139
140.. option:: --section-data
141
James Henderson9e38f512019-07-05 16:38:52 +0000142 When used with :option:`--sections`, display section data for each section
143 shown. This option has no effect for GNU style output.
James Henderson90c57e02019-07-01 16:18:57 +0000144
145.. option:: --section-mapping
146
147 Display the section to segment mapping.
148
149.. option:: --section-relocations
150
James Henderson9e38f512019-07-05 16:38:52 +0000151 When used with :option:`--sections`, display relocations for each section
152 shown. This option has no effect for GNU style output.
James Henderson90c57e02019-07-01 16:18:57 +0000153
154.. option:: --section-symbols
155
156 When used with :option:`--sections`, display symbols for each section shown.
James Henderson9e38f512019-07-05 16:38:52 +0000157 This option has no effect for GNU style output.
James Henderson90c57e02019-07-01 16:18:57 +0000158
159.. option:: --stackmap
160
161 Display contents of the stackmap section.
162
Wolfgang Piebc71c6292019-08-05 22:47:07 +0000163.. option:: --stack-sizes
164
165 Display the contents of the stack sizes section(s), i.e. pairs of function
James Hendersona2497b42019-09-13 15:01:39 +0000166 names and the size of their stack frames. Currently only implemented for GNU
167 style output.
Wolfgang Piebc71c6292019-08-05 22:47:07 +0000168
James Henderson90c57e02019-07-01 16:18:57 +0000169.. option:: --string-dump=<section[,section,...]>, -p
170
171 Display the specified section(s) as a list of strings. ``section`` may be a
172 section index or section name.
173
174.. option:: --symbols, --syms, -s
175
176 Display the symbol table.
177
178.. option:: --unwind, -u
179
180 Display unwind information.
181
182.. option:: --version
183
James Henderson778a5e52019-09-17 11:43:42 +0000184 Display the version of the :program:`llvm-readelf` executable.
James Henderson90c57e02019-07-01 16:18:57 +0000185
186.. option:: --version-info, -V
187
188 Display version sections.
189
190.. option:: @<FILE>
191
192 Read command-line options from response file `<FILE>`.
193
194EXIT STATUS
195-----------
196
197:program:`llvm-readelf` returns 0 under normal operation. It returns a non-zero
198exit code if there were any errors.
199
200SEE ALSO
201--------
202
203:manpage:`llvm-nm(1)`, :manpage:`llvm-objdump(1)`, :manpage:`llvm-readobj(1)`