llvm.org GIT mirror llvm / a1ebca4
[docs][llvm-readelf] Expand llvm-readelf documentation Previously, the llvm-readelf documentation was essentially just a list of differences to llvm-readobj. Since llvm-readelf is the more likely goto tool for many people migrating to the LLVM toolchain, it seems like it would be helpful to document all the switches in the llvm-readelf document too. This change expands the options listed accordingly. Additionally, they are unlikely to care what the differences are to llvm-readobj, since they won't be familiar with the latter as there is no GNU equivalent, so this change moves the "differences" section to llvm-readobj's documentation. Reviewed by: peter.smith Differential Revision: https://reviews.llvm.org/D63826 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@364800 91177308-0d34-0410-b5e6-96231b3b80d8 James Henderson a month ago
2 changed file(s) with 218 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
0 llvm-readelf - GNU-style LLVM Object Reader
1 ===========================================
2
3 .. program:: llvm-readelf
4
5 SYNOPSIS
6 --------
7
8 :program:`llvm-readelf` [*options*] [*input...*]
9
10 DESCRIPTION
11 -----------
12
13 The :program:`llvm-readelf` tool displays low-level format-specific information
14 about one or more object files.
15
16 If ``input`` is "``-``" or omitted, :program:`llvm-readelf` reads from standard
17 input. Otherwise, it will read from the specified ``filenames``.
18
19 OPTIONS
20 -------
21
22 .. option:: --all
23
24 Equivalent to specifying all the main display options.
25
26 .. option:: --addrsig
27
28 Display the address-significance table.
29
30 .. option:: --arm-attributes
31
32 Display the ARM attributes section. Only applicable for ARM architectures.
33
34 .. option:: --color
35
36 Use colors in the output for warnings and errors.
37
38 .. option:: --demangle, -C
39
40 Display demangled symbol names in the output.
41
42 .. option:: --dyn-relocations
43
44 Display the dynamic relocation entries.
45
46 .. option:: --dyn-symbols, --dyn-syms
47
48 Display the dynamic symbol table.
49
50 .. option:: --dynamic-table, --dynamic, -d
51
52 Display the dynamic table.
53
54 .. option:: --elf-cg-profile
55
56 Display the callgraph profile section.
57
58 .. option:: --elf-hash-histogram, --histogram, -I
59
60 Display a bucket list histogram for dynamic symbol hash tables.
61
62 .. option:: --elf-linker-options
63
64 Display the linker options section.
65
66 .. option:: --elf-output-style=
67
68 Specify the style to dump ELF information in. Valid options are ``LLVM`` and
69 ``GNU``. ``LLVM`` output is an expanded and structured format, whilst ``GNU``
70 (the default) output mimics the equivalent GNU :program:`readelf` output.
71
72 .. option:: --elf-section-groups, --section-groups, -g
73
74 Display section groups.
75
76 .. option:: --expand-relocs
77
78 When used with :option:`--relocations`, display each relocation in an expanded
79 multi-line format.
80
81 .. option:: --file-headers, -h
82
83 Display file headers.
84
85 .. option:: --gnu-hash-table
86
87 Display the GNU hash table for dynamic symbols.
88
89 .. option:: --hash-symbols
90
91 Display the dynamic symbols derived from the hash table.
92
93 .. option:: --hash-table
94
95 Display the hash table for dynamic symbols.
96
97 .. option:: --headers, -e
98
99 Equivalent to setting: :option:`--file-headers`, :option:`--program-headers`,
100 and :option:`--sections`.
101
102 .. option:: --help
103
104 Display a summary of command line options.
105
106 .. option:: --help-list
107
108 Display an uncategorized summary of command line options.
109
110 .. option:: --hex-dump=, -x
111
112 Display the specified section(s) as hexadecimal bytes. ``section`` may be a
113 section index or section name.
114
115 .. option:: --needed-libs
116
117 Display the needed libraries.
118
119 .. option:: --notes, -n
120
121 Display all notes.
122
123 .. option:: --program-headers, --segments, -l
124
125 Display the program headers.
126
127 .. option:: --raw-relr
128
129 Do not decode relocations in RELR relocation sections when displaying them.
130
131 .. option:: --relocations, --relocs, -r
132
133 Display the relocation entries in the file.
134
135 .. option:: --sections, --section-headers, -S
136
137 Display all sections.
138
139 .. option:: --section-data
140
141 When used with :option:`--sections`, display section data for each section shown.
142
143 .. option:: --section-mapping
144
145 Display the section to segment mapping.
146
147 .. option:: --section-relocations
148
149 When used with :option:`--sections`, display relocations for each section shown.
150
151 .. option:: --section-symbols
152
153 When used with :option:`--sections`, display symbols for each section shown.
154
155 .. option:: --stackmap
156
157 Display contents of the stackmap section.
158
159 .. option:: --string-dump=, -p
160
161 Display the specified section(s) as a list of strings. ``section`` may be a
162 section index or section name.
163
164 .. option:: --symbols, --syms, -s
165
166 Display the symbol table.
167
168 .. option:: --unwind, -u
169
170 Display unwind information.
171
172 .. option:: --version
173
174 Display the version of this program.
175
176 .. option:: --version-info, -V
177
178 Display version sections.
179
180 .. option:: @
181
182 Read command-line options from response file ``.
183
184 EXIT STATUS
185 -----------
186
187 :program:`llvm-readelf` returns 0 under normal operation. It returns a non-zero
188 exit code if there were any errors.
189
190 SEE ALSO
191 --------
192
193 :manpage:`llvm-nm(1)`, :manpage:`llvm-objdump(1)`, :manpage:`llvm-readobj(1)`
1515
1616 If ``input`` is "``-``" or omitted, :program:`llvm-readobj` reads from standard
1717 input. Otherwise, it will read from the specified ``filenames``.
18
19 DIFFERENCES TO LLVM-READELF
20 ---------------------------
21
22 :program:`llvm-readelf` is an alias for the :manpage:`llvm-readobj` tool with a
23 slightly different command-line interface and output that is GNU compatible.
24 Following is a list of differences between :program:`llvm-readelf` and
25 :program:`llvm-readobj`:
26
27 - :program:`llvm-readelf` uses `GNU` for the :option:`--elf-output-style` option
28 by default. :program:`llvm-readobj` uses `LLVM`.
29 - :program:`llvm-readelf` allows single-letter grouped flags (e.g.
30 ``llvm-readelf -SW`` is the same as ``llvm-readelf -S -W``).
31 :program:`llvm-readobj` does not allow grouping.
32 - :program:`llvm-readelf` provides :option:`-s` as an alias for
33 :option:`--symbols`, for GNU :program:`readelf` compatibility, whereas it is
34 an alias for :option:`--section-headers` in :program:`llvm-readobj`.
35 - :program:`llvm-readobj` provides ``-t`` as an alias for :option:`--symbols`.
36 :program:`llvm-readelf` does not.
37 - :program:`llvm-readobj` provides ``--sr``, ``--sd``, ``--st`` and ``--dt`` as
38 aliases for :option:`--section-relocations`, :option:`--section-data`,
39 :option:`--section-symbols` and :option:`--dyn-symbols` respectively.
40 :program:`llvm-readelf` does not provide these aliases, to avoid conflicting
41 with grouped flags.
1842
1943 GENERAL AND MULTI-FORMAT OPTIONS
2044 --------------------------------