1 llvm-nm - list LLVM bitcode and object file's symbol table
2 ==========================================================
9 :program:`llvm-nm` [*options*] [*filenames...*]
16 The :program:`llvm-nm` utility lists the names of symbols from the LLVM bitcode
17 files, object files, or :program:`ar` archives containing them, named on the
18 command line. Each symbol is listed along with some simple information about its
19 provenance. If no file name is specified, or *-* is used as a file name,
20 :program:`llvm-nm` will process a file on its standard input stream.
22 :program:`llvm-nm`'s default output format is the traditional BSD :program:`nm`
23 output format. Each such output record consists of an (optional) 8-digit
24 hexadecimal address, followed by a type code character, followed by a name, for
25 each symbol. One record is printed per line; fields are separated by spaces.
26 When the address is omitted, it is replaced by 8 spaces.
28 Type code characters currently supported, and their meanings, are as follows:
33 Named object is referenced but undefined in this bitcode file
39 Common (multiple definitions link together into one def)
45 Weak reference (multiple definitions link together into zero or one definitions)
51 Local function (text) object
57 Global function (text) object
75 Something unrecognizable
79 Because LLVM bitcode files typically contain objects that are not considered to
80 have addresses until they are linked into an executable image or dynamically
81 compiled "just-in-time", :program:`llvm-nm` does not print an address for any
82 symbol in a LLVM bitcode file, even symbols which are defined in the bitcode
93 .. option:: -B (default)
95 Use BSD output format. Alias for :option:`--format=bsd`.
100 Use POSIX.2 output format. Alias for :option:`--format=posix`.
103 .. option:: --debug-syms, -a
105 Show all symbols, even debugger only.
108 .. option:: --defined-only
110 Print only symbols defined in this file (as opposed to
111 symbols which may be referenced by objects in this file, but not
112 defined in this file.)
115 .. option:: --dynamic, -D
117 Display dynamic symbols instead of normal symbols.
120 .. option:: --extern-only, -g
122 Print only symbols whose definitions are external; that is, accessible
126 .. option:: --format=format, -f format
128 Select an output format; *format* may be *sysv*, *posix*, or *bsd*. The default
134 Print a summary of command-line options and their meanings.
137 .. option:: --no-sort, -p
139 Shows symbols in order encountered.
142 .. option:: --numeric-sort, -n, -v
144 Sort symbols by address.
147 .. option:: --print-file-name, -A, -o
149 Precede each symbol with the file it came from.
152 .. option:: --print-size, -S
154 Show symbol size instead of address.
157 .. option:: --size-sort
159 Sort symbols by size.
162 .. option:: --undefined-only, -u
164 Print only symbols referenced but not defined in this file.
171 * :program:`llvm-nm` cannot demangle C++ mangled names, like GNU :program:`nm`
174 * :program:`llvm-nm` does not support the full set of arguments that GNU
182 :program:`llvm-nm` exits with an exit code of zero.
189 llvm-dis|llvm-dis, ar(1), nm(1)