2 .\" Man page generated from reStructuredText.
4 .TH "LLVM-NM" "1" "2020-06-26" "10" "LLVM"
6 llvm-nm \- list LLVM bitcode and object file's symbol table
8 .nr rst2man-indent-level 0
12 level \\n[rst2man-indent-level]
13 level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
20 .\" .rstReportMargin pre:
22 . nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
23 . nr rst2man-indent-level +1
24 .\" .rstReportMargin post:
28 .\" indent \\n[an-margin]
29 .\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
30 .nr rst2man-indent-level -1
31 .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
32 .in \\n[rst2man-indent\\n[rst2man-indent-level]]u
36 \fBllvm\-nm\fP [\fIoptions\fP] [\fIfilenames...\fP]
39 The \fBllvm\-nm\fP utility lists the names of symbols from LLVM bitcode
40 files, object files, and archives. Each symbol is listed along with some simple
41 information about its provenance. If no filename is specified, \fIa.out\fP is used
42 as the input. If \fI\-\fP is used as a filename, \fBllvm\-nm\fP will read a file
43 from its standard input stream.
45 \fBllvm\-nm\fP\(aqs default output format is the traditional BSD \fBnm\fP
46 output format. Each such output record consists of an (optional) 8\-digit
47 hexadecimal address, followed by a type code character, followed by a name, for
48 each symbol. One record is printed per line; fields are separated by spaces.
49 When the address is omitted, it is replaced by 8 spaces.
51 The supported type code characters are as follows. Where both lower and
52 upper\-case characters are listed for the same meaning, a lower\-case character
53 represents a local symbol, whilst an upper\-case character represents a global
66 Uninitialized data (bss) object.
73 Common symbol. Multiple definitions link together into one definition.
87 COFF: .idata symbol or symbol in a section with IMAGE_SCN_LNK_INFO set.
94 ELF: local symbol from non\-alloc section.
103 ELF: debug section symbol, or global symbol from non\-alloc section.
110 COFF: section symbol.
112 Mach\-O: absolute symbol or symbol from a section other than __TEXT_EXEC __text,
113 __TEXT __text, __DATA __data, or __DATA __bss.
120 Read\-only data object.
134 ELF: GNU unique symbol.
141 Named object is undefined in this file.
148 ELF: Undefined weak object. It is not a link failure if the object is not
156 ELF: Defined weak object symbol. This definition will only be used if no
157 regular definitions exist in a link. If multiple weak definitions and no
158 regular definitions exist, one of the weak definitions will be used.
165 Undefined weak symbol other than an ELF object symbol. It is not a link failure
166 if the symbol is not defined.
173 Defined weak symbol other than an ELF object symbol. This definition will only
174 be used if no regular definitions exist in a link. If multiple weak definitions
175 and no regular definitions exist, one of the weak definitions will be used.
182 Mach\-O: N_STAB symbol.
189 Something unrecognizable.
193 Because LLVM bitcode files typically contain objects that are not considered to
194 have addresses until they are linked into an executable image or dynamically
195 compiled "just\-in\-time", \fBllvm\-nm\fP does not print an address for any
196 symbol in an LLVM bitcode file, even symbols which are defined in the bitcode
202 Use BSD output format. Alias for \fB\-\-format=bsd\fP\&.
206 .B \-\-debug\-syms, \-a
207 Show all symbols, even those usually suppressed.
211 .B \-\-defined\-only, \-U
212 Print only symbols defined in this file.
217 Demangle symbol names.
222 Display dynamic symbols instead of normal symbols.
226 .B \-\-extern\-only, \-g
227 Print only symbols whose definitions are external; that is, accessible from
232 .B \-\-format=<format>, \-f
233 Select an output format; \fIformat\fP may be \fIsysv\fP, \fIposix\fP, \fIdarwin\fP, or \fIbsd\fP\&.
234 The default is \fIbsd\fP\&.
239 Print a summary of command\-line options and their meanings.
244 Print an uncategorized summary of command\-line options and their meanings.
248 .B \-\-just\-symbol\-name, \-j
249 Print just the symbol names.
254 Use Darwin format. Alias for \fB\-\-format=darwin\fP\&.
259 Don\(aqt demangle symbol names. This is the default.
264 Disable the LLVM bitcode reader.
269 Show symbols in the order encountered.
274 Don\(aqt print weak symbols.
278 .B \-\-numeric\-sort, \-n, \-v
279 Sort symbols by address.
283 .B \-\-portability, \-P
284 Use POSIX.2 output format. Alias for \fB\-\-format=posix\fP\&.
288 .B \-\-print\-armap, \-M
289 Print the archive symbol table, in addition to the symbols.
293 .B \-\-print\-file\-name, \-A, \-o
294 Precede each symbol with the file it came from.
298 .B \-\-print\-size, \-S
299 Show symbol size as well as address (not applicable for Mach\-O).
303 .B \-\-radix=<RADIX>, \-t
304 Specify the radix of the symbol address(es). Values accepted are \fId\fP (decimal),
305 \fIx\fP (hexadecimal) and \fIo\fP (octal).
309 .B \-\-reverse\-sort, \-r
310 Sort symbols in reverse order.
315 Sort symbols by size.
320 Ignored. For GNU compatibility only.
324 .B \-\-undefined\-only, \-u
325 Print only undefined symbols.
330 Display the version of the \fBllvm\-nm\fP executable. Does not stack with
335 .B \-\-without\-aliases
336 Exclude aliases from the output.
341 Read command\-line options from response file \fI<FILE>\fP\&.
343 .SH MACH-O SPECIFIC OPTIONS
347 Add symbols from the dyldinfo, if they are not already in the symbol table.
352 .B \-\-arch=<arch1[,arch2,...]>
353 Dump the symbols from the specified architecture(s).
357 .B \-\-dyldinfo\-only
358 Dump only symbols from the dyldinfo.
363 Do not add any symbols from the dyldinfo.
367 .B \-s=<segment section>
368 Dump only symbols from this segment and section name.
373 Print symbol entry in hex.
380 \fBllvm\-nm\fP does not support the full set of arguments that GNU
387 \fBllvm\-nm\fP exits with an exit code of zero.
390 \fBllvm\-ar(1)\fP, \fBllvm\-objdump(1)\fP, \fBllvm\-readelf(1)\fP,
391 \fBllvm\-readobj(1)\fP
393 Maintained by the LLVM Team (https://llvm.org/).
395 2003-2020, LLVM Project
396 .\" Generated by docutils manpage writer.