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`` and
76 ``GNU``. ``LLVM`` output is an expanded and structured format, whilst ``GNU``
77 (the default) output mimics the equivalent GNU :program:`readelf` output.
79 .. option:: --section-groups, -g
81 Display section groups.
83 .. option:: --expand-relocs
85 When used with :option:`--relocations`, display each relocation in an expanded
88 .. option:: --file-header, -h
92 .. option:: --gnu-hash-table
94 Display the GNU hash table for dynamic symbols.
96 .. option:: --hash-symbols
98 Display the expanded hash table with dynamic symbol data.
100 .. option:: --hash-table
102 Display the hash table for dynamic symbols.
104 .. option:: --headers, -e
106 Equivalent to setting: :option:`--file-header`, :option:`--program-headers`,
107 and :option:`--sections`.
111 Display a summary of command line options.
113 .. option:: --hex-dump=<section[,section,...]>, -x
115 Display the specified section(s) as hexadecimal bytes. ``section`` may be a
116 section index or section name.
118 .. option:: --needed-libs
120 Display the needed libraries.
122 .. option:: --no-demangle
124 Do not display demangled symbol names in the output. On by default.
126 .. option:: --notes, -n
130 .. option:: --program-headers, --segments, -l
132 Display the program headers.
134 .. option:: --raw-relr
136 Do not decode relocations in RELR relocation sections when displaying them.
138 .. option:: --relocations, --relocs, -r
140 Display the relocation entries in the file.
142 .. option:: --sections, --section-headers, -S
144 Display all sections.
146 .. option:: --section-data
148 When used with :option:`--sections`, display section data for each section
149 shown. This option has no effect for GNU style output.
151 .. option:: --section-details, -t
153 Display all section details. Used as an alternative to :option:`--sections`.
155 .. option:: --section-mapping
157 Display the section to segment mapping.
159 .. option:: --section-relocations
161 When used with :option:`--sections`, display relocations for each section
162 shown. This option has no effect for GNU style output.
164 .. option:: --section-symbols
166 When used with :option:`--sections`, display symbols for each section shown.
167 This option has no effect for GNU style output.
169 .. option:: --stackmap
171 Display contents of the stackmap section.
173 .. option:: --stack-sizes
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
179 .. option:: --string-dump=<section[,section,...]>, -p
181 Display the specified section(s) as a list of strings. ``section`` may be a
182 section index or section name.
184 .. option:: --symbols, --syms, -s
186 Display the symbol table. Also display the dynamic symbol table when using GNU output style for ELF.
188 .. option:: --unwind, -u
190 Display unwind information.
192 .. option:: --version
194 Display the version of the :program:`llvm-readelf` executable.
196 .. option:: --version-info, -V
198 Display version sections.
200 .. option:: --wide, -W
202 Ignored for GNU readelf compatibility. The output is already similar to when using -W with GNU readelf.
206 Read command-line options from response file `<FILE>`.
211 :program:`llvm-readelf` returns 0 under normal operation. It returns a non-zero
212 exit code if there were any errors.
217 :manpage:`llvm-nm(1)`, :manpage:`llvm-objdump(1)`, :manpage:`llvm-readobj(1)`