Nico Rieck | 5143243 | 2013-04-11 00:05:57 +0000 | [diff] [blame] | 1 | llvm-readobj - LLVM Object Reader |
| 2 | ================================= |
| 3 | |
James Henderson | a056684 | 2019-06-27 13:24:46 +0000 | [diff] [blame] | 4 | .. program:: llvm-readobj |
| 5 | |
Nico Rieck | 5143243 | 2013-04-11 00:05:57 +0000 | [diff] [blame] | 6 | SYNOPSIS |
| 7 | -------- |
| 8 | |
| 9 | :program:`llvm-readobj` [*options*] [*input...*] |
| 10 | |
| 11 | DESCRIPTION |
| 12 | ----------- |
| 13 | |
| 14 | The :program:`llvm-readobj` tool displays low-level format-specific information |
James Henderson | b96d9d8 | 2019-06-25 13:12:38 +0000 | [diff] [blame] | 15 | about one or more object files. |
Nico Rieck | 5143243 | 2013-04-11 00:05:57 +0000 | [diff] [blame] | 16 | |
| 17 | If ``input`` is "``-``" or omitted, :program:`llvm-readobj` reads from standard |
| 18 | input. Otherwise, it will read from the specified ``filenames``. |
| 19 | |
James Henderson | b96d9d8 | 2019-06-25 13:12:38 +0000 | [diff] [blame] | 20 | GENERAL AND MULTI-FORMAT OPTIONS |
| 21 | -------------------------------- |
Nico Rieck | 5143243 | 2013-04-11 00:05:57 +0000 | [diff] [blame] | 22 | |
James Henderson | b96d9d8 | 2019-06-25 13:12:38 +0000 | [diff] [blame] | 23 | These options are applicable to more than one file format, or are unrelated to |
| 24 | file formats. |
Nico Rieck | 5143243 | 2013-04-11 00:05:57 +0000 | [diff] [blame] | 25 | |
James Henderson | b96d9d8 | 2019-06-25 13:12:38 +0000 | [diff] [blame] | 26 | .. option:: --all |
Nico Rieck | 5143243 | 2013-04-11 00:05:57 +0000 | [diff] [blame] | 27 | |
James Henderson | b96d9d8 | 2019-06-25 13:12:38 +0000 | [diff] [blame] | 28 | Equivalent to specifying all the main display options relevant to the file |
| 29 | format. |
Nico Rieck | 5143243 | 2013-04-11 00:05:57 +0000 | [diff] [blame] | 30 | |
James Henderson | b96d9d8 | 2019-06-25 13:12:38 +0000 | [diff] [blame] | 31 | .. option:: --addrsig |
| 32 | |
| 33 | Display the address-significance table. |
| 34 | |
| 35 | .. option:: --color |
| 36 | |
| 37 | Use colors in the output for warnings and errors. |
| 38 | |
| 39 | .. option:: --expand-relocs |
| 40 | |
| 41 | When used with :option:`--relocations`, display each relocation in an expanded |
| 42 | multi-line format. |
| 43 | |
| 44 | .. option:: --file-headers, -h |
Nico Rieck | 5143243 | 2013-04-11 00:05:57 +0000 | [diff] [blame] | 45 | |
| 46 | Display file headers. |
| 47 | |
James Henderson | b96d9d8 | 2019-06-25 13:12:38 +0000 | [diff] [blame] | 48 | .. option:: --headers, -e |
Nico Rieck | 5143243 | 2013-04-11 00:05:57 +0000 | [diff] [blame] | 49 | |
James Henderson | b96d9d8 | 2019-06-25 13:12:38 +0000 | [diff] [blame] | 50 | Equivalent to setting: :option:`--file-headers`, :option:`--program-headers`, |
| 51 | and :option:`--sections`. |
Nico Rieck | 5143243 | 2013-04-11 00:05:57 +0000 | [diff] [blame] | 52 | |
James Henderson | b96d9d8 | 2019-06-25 13:12:38 +0000 | [diff] [blame] | 53 | .. option:: --help |
Nico Rieck | 5143243 | 2013-04-11 00:05:57 +0000 | [diff] [blame] | 54 | |
James Henderson | b96d9d8 | 2019-06-25 13:12:38 +0000 | [diff] [blame] | 55 | Display a summary of command line options. |
Nico Rieck | 5143243 | 2013-04-11 00:05:57 +0000 | [diff] [blame] | 56 | |
James Henderson | b96d9d8 | 2019-06-25 13:12:38 +0000 | [diff] [blame] | 57 | .. option:: --help-list |
Nico Rieck | 5143243 | 2013-04-11 00:05:57 +0000 | [diff] [blame] | 58 | |
James Henderson | b96d9d8 | 2019-06-25 13:12:38 +0000 | [diff] [blame] | 59 | Display an uncategorized summary of command line options. |
Nico Rieck | 5143243 | 2013-04-11 00:05:57 +0000 | [diff] [blame] | 60 | |
James Henderson | b96d9d8 | 2019-06-25 13:12:38 +0000 | [diff] [blame] | 61 | .. option:: --hex-dump=<section[,section,...]>, -x |
Nico Rieck | 5143243 | 2013-04-11 00:05:57 +0000 | [diff] [blame] | 62 | |
James Henderson | b96d9d8 | 2019-06-25 13:12:38 +0000 | [diff] [blame] | 63 | Display the specified section(s) as hexadecimal bytes. ``section`` may be a |
| 64 | section index or section name. |
Nico Rieck | 5143243 | 2013-04-11 00:05:57 +0000 | [diff] [blame] | 65 | |
James Henderson | b96d9d8 | 2019-06-25 13:12:38 +0000 | [diff] [blame] | 66 | .. option:: --needed-libs |
| 67 | |
| 68 | Display the needed libraries. |
| 69 | |
| 70 | .. option:: --relocations, --relocs, -r |
Nico Rieck | 5143243 | 2013-04-11 00:05:57 +0000 | [diff] [blame] | 71 | |
| 72 | Display the relocation entries in the file. |
| 73 | |
James Henderson | b96d9d8 | 2019-06-25 13:12:38 +0000 | [diff] [blame] | 74 | .. option:: --sections, --section-headers, -s, -S |
| 75 | |
| 76 | Display all sections. |
| 77 | |
| 78 | .. option:: --section-data, --sd |
| 79 | |
| 80 | When used with :option:`--sections`, display section data for each section shown. |
| 81 | |
| 82 | .. option:: --section-relocations, --sr |
| 83 | |
| 84 | When used with :option:`--sections`, display relocations for each section shown. |
| 85 | |
| 86 | .. option:: --section-symbols, --st |
| 87 | |
| 88 | When used with :option:`--sections`, display symbols for each section shown. |
| 89 | |
| 90 | .. option:: --stackmap |
| 91 | |
| 92 | Display contents of the stackmap section. |
| 93 | |
| 94 | .. option:: --string-dump=<section[,section,...]>, -p |
| 95 | |
| 96 | Display the specified section(s) as a list of strings. ``section`` may be a |
| 97 | section index or section name. |
| 98 | |
| 99 | .. option:: --symbols, --syms, -t |
Nico Rieck | 5143243 | 2013-04-11 00:05:57 +0000 | [diff] [blame] | 100 | |
| 101 | Display the symbol table. |
| 102 | |
James Henderson | b96d9d8 | 2019-06-25 13:12:38 +0000 | [diff] [blame] | 103 | .. option:: --unwind, -u |
Nico Rieck | 5143243 | 2013-04-11 00:05:57 +0000 | [diff] [blame] | 104 | |
| 105 | Display unwind information. |
| 106 | |
James Henderson | b96d9d8 | 2019-06-25 13:12:38 +0000 | [diff] [blame] | 107 | .. option:: --version |
Nico Rieck | f3f0b79 | 2013-04-12 04:01:52 +0000 | [diff] [blame] | 108 | |
James Henderson | b96d9d8 | 2019-06-25 13:12:38 +0000 | [diff] [blame] | 109 | Display the version of this program. |
James Henderson | e50d9cb | 2019-01-17 15:34:12 +0000 | [diff] [blame] | 110 | |
James Henderson | 9485b26 | 2019-06-21 11:49:20 +0000 | [diff] [blame] | 111 | .. option:: @<FILE> |
| 112 | |
| 113 | Read command-line options from response file `<FILE>`. |
| 114 | |
James Henderson | b96d9d8 | 2019-06-25 13:12:38 +0000 | [diff] [blame] | 115 | ELF SPECIFIC OPTIONS |
| 116 | -------------------- |
| 117 | |
| 118 | The following options are implemented only for the ELF file format. |
| 119 | |
| 120 | .. option:: --arm-attributes |
| 121 | |
| 122 | Display the ARM attributes section. Only applicable for ARM architectures. |
| 123 | |
| 124 | .. option:: --demangle, -C |
| 125 | |
| 126 | Display demangled symbol names in the output. |
| 127 | |
| 128 | .. option:: --dyn-relocations |
| 129 | |
| 130 | Display the dynamic relocation entries. |
| 131 | |
| 132 | .. option:: --dyn-symbols, --dyn-syms, --dt |
| 133 | |
| 134 | Display the dynamic symbol table. |
| 135 | |
| 136 | .. option:: --dynamic-table, --dynamic, -d |
| 137 | |
| 138 | Display the dynamic table. |
| 139 | |
| 140 | .. option:: --elf-cg-profile |
| 141 | |
| 142 | Display the callgraph profile section. |
| 143 | |
| 144 | .. option:: --elf-hash-histogram, --histogram, -I |
| 145 | |
| 146 | Display a bucket list histogram for dynamic symbol hash tables. |
| 147 | |
| 148 | .. option:: --elf-linker-options |
| 149 | |
| 150 | Display the linker options section. |
| 151 | |
| 152 | .. option:: --elf-output-style=<value> |
| 153 | |
| 154 | Specify the style to dump ELF information in. Valid options are ``LLVM`` and |
| 155 | ``GNU``. ``LLVM`` output (the default) is an expanded and structured format, |
| 156 | whilst ``GNU`` output mimics the equivalent GNU :program:`readelf` output. |
| 157 | |
| 158 | .. option:: --elf-section-groups, --section-groups, -g |
| 159 | |
| 160 | Display section groups. |
| 161 | |
| 162 | .. option:: --gnu-hash-table |
| 163 | |
| 164 | Display the GNU hash table for dynamic symbols. |
| 165 | |
| 166 | .. option:: --hash-symbols |
| 167 | |
| 168 | Display the dynamic symbols derived from the hash table. |
| 169 | |
| 170 | .. option:: --hash-table |
| 171 | |
| 172 | Display the hash table for dynamic symbols. |
| 173 | |
| 174 | .. option:: --notes, -n |
| 175 | |
| 176 | Display all notes. |
| 177 | |
| 178 | .. option:: --program-headers, --segments, -l |
| 179 | |
| 180 | Display the program headers. |
| 181 | |
| 182 | .. option:: --raw-relr |
| 183 | |
| 184 | Do not decode relocations in RELR relocation sections when displaying them. |
| 185 | |
| 186 | .. option:: --section-mapping |
| 187 | |
| 188 | Display the section to segment mapping. |
| 189 | |
| 190 | .. option:: --version-info, -V |
| 191 | |
| 192 | Display version sections. |
| 193 | |
| 194 | MACH-O SPECIFIC OPTIONS |
| 195 | ----------------------- |
| 196 | |
| 197 | The following options are implemented only for the Mach-O file format. |
| 198 | |
| 199 | .. option:: --macho-data-in-code |
| 200 | |
| 201 | Display the Data in Code command. |
| 202 | |
| 203 | .. option:: --macho-dsymtab |
| 204 | |
| 205 | Display the Dsymtab command. |
| 206 | |
| 207 | .. option:: --macho-indirect-symbols |
| 208 | |
| 209 | Display indirect symbols. |
| 210 | |
| 211 | .. option:: --macho-linker-options |
| 212 | |
| 213 | Display the Mach-O-specific linker options. |
| 214 | |
| 215 | .. option:: --macho-segment |
| 216 | |
| 217 | Display the Segment command. |
| 218 | |
| 219 | .. option:: --macho-version-min |
| 220 | |
| 221 | Display the version min command. |
| 222 | |
| 223 | PE/COFF SPECIFIC OPTIONS |
| 224 | ------------------------ |
| 225 | |
| 226 | The following options are implemented only for the PE/COFF file format. |
| 227 | |
| 228 | .. option:: --codeview |
| 229 | |
| 230 | Display CodeView debug information. |
| 231 | |
| 232 | .. option:: --codeview-ghash |
| 233 | |
| 234 | Enable global hashing for CodeView type stream de-duplication. |
| 235 | |
| 236 | .. option:: --codeview-merged-types |
| 237 | |
| 238 | Display the merged CodeView type stream. |
| 239 | |
| 240 | .. option:: --codeview-subsection-bytes |
| 241 | |
| 242 | Dump raw contents of CodeView debug sections and records. |
| 243 | |
| 244 | .. option:: --coff-basereloc |
| 245 | |
| 246 | Display the .reloc section. |
| 247 | |
| 248 | .. option:: --coff-debug-directory |
| 249 | |
| 250 | Display the debug directory. |
| 251 | |
| 252 | .. option:: --coff-directives |
| 253 | |
| 254 | Display the .drectve section. |
| 255 | |
| 256 | .. option:: --coff-exports |
| 257 | |
| 258 | Display the export table. |
| 259 | |
| 260 | .. option:: --coff-imports |
| 261 | |
| 262 | Display the import table. |
| 263 | |
| 264 | .. option:: --coff-load-config |
| 265 | |
| 266 | Display the load config. |
| 267 | |
| 268 | .. option:: --coff-resources |
| 269 | |
| 270 | Display the .rsrc section. |
| 271 | |
Nico Rieck | 5143243 | 2013-04-11 00:05:57 +0000 | [diff] [blame] | 272 | EXIT STATUS |
| 273 | ----------- |
| 274 | |
James Henderson | b96d9d8 | 2019-06-25 13:12:38 +0000 | [diff] [blame] | 275 | :program:`llvm-readobj` returns 0 under normal operation. It returns a non-zero |
| 276 | exit code if there were any errors. |
| 277 | |
| 278 | SEE ALSO |
| 279 | -------- |
| 280 | |
| 281 | :manpage:`llvm-nm(1)`, :manpage:`llvm-objdump(1)`, :manpage:`llvm-readelf(1)` |