1 llvm-nm - list LLVM bitcode and object file's symbol table
2 ==========================================================
7 :program:`llvm-nm` [*options*] [*filenames...*]
12 The :program:`llvm-nm` utility lists the names of symbols from the LLVM bitcode
13 files, object files, or :program:`ar` archives containing them, named on the
14 command line. Each symbol is listed along with some simple information about
15 its provenance. If no file name is specified, or *-* is used as a file name,
16 :program:`llvm-nm` will process a file on its standard input stream.
18 :program:`llvm-nm`'s default output format is the traditional BSD :program:`nm`
19 output format. Each such output record consists of an (optional) 8-digit
20 hexadecimal address, followed by a type code character, followed by a name, for
21 each symbol. One record is printed per line; fields are separated by spaces.
22 When the address is omitted, it is replaced by 8 spaces.
24 Type code characters currently supported, and their meanings, are as follows:
28 Named object is referenced but undefined in this bitcode file
32 Common (multiple definitions link together into one def)
36 Weak reference (multiple definitions link together into zero or one definitions)
40 Local function (text) object
44 Global function (text) object
56 Something unrecognizable
58 Because LLVM bitcode files typically contain objects that are not considered to
59 have addresses until they are linked into an executable image or dynamically
60 compiled "just-in-time", :program:`llvm-nm` does not print an address for any
61 symbol in an LLVM bitcode file, even symbols which are defined in the bitcode
69 .. option:: -B (default)
71 Use BSD output format. Alias for `--format=bsd`.
75 Use POSIX.2 output format. Alias for `--format=posix`.
77 .. option:: --debug-syms, -a
79 Show all symbols, even debugger only.
81 .. option:: --defined-only
83 Print only symbols defined in this file (as opposed to
84 symbols which may be referenced by objects in this file, but not
85 defined in this file.)
87 .. option:: --dynamic, -D
89 Display dynamic symbols instead of normal symbols.
91 .. option:: --extern-only, -g
93 Print only symbols whose definitions are external; that is, accessible
96 .. option:: --no-weak, -W
98 Don't print any weak symbols in the output.
100 .. option:: --format=format, -f format
102 Select an output format; *format* may be *sysv*, *posix*, or *bsd*. The default
107 Print a summary of command-line options and their meanings.
109 .. option:: --no-sort, -p
111 Shows symbols in order encountered.
113 .. option:: --numeric-sort, -n, -v
115 Sort symbols by address.
117 .. option:: --print-file-name, -A, -o
119 Precede each symbol with the file it came from.
121 .. option:: --print-size, -S
123 Show symbol size instead of address.
125 .. option:: --size-sort
127 Sort symbols by size.
129 .. option:: --undefined-only, -u
131 Print only symbols referenced but not defined in this file.
133 .. option:: --radix=RADIX, -t
135 Specify the radix of the symbol address(es). Values accepted d(decimal),
136 x(hexadecomal) and o(octal).
141 * :program:`llvm-nm` does not support the full set of arguments that GNU
147 :program:`llvm-nm` exits with an exit code of zero.
152 llvm-dis, ar(1), nm(1)