1 llvm-nm - list LLVM bitcode file's symbol table
2 ===============================================
9 **llvm-nm** [*options*] [*filenames...*]
16 The **llvm-nm** utility lists the names of symbols from the LLVM bitcode files,
17 or **ar** archives containing LLVM bitcode files, named on the command line.
18 Each symbol is listed along with some simple information about its provenance.
19 If no file name is specified, or *-* is used as a file name, **llvm-nm** will
20 process a bitcode file on its standard input stream.
22 **llvm-nm**'s default output format is the traditional BSD **nm** output format.
23 Each such output record consists of an (optional) 8-digit hexadecimal address,
24 followed by a type code character, followed by a name, for each symbol. One
25 record is printed per line; fields are separated by spaces. When the address is
26 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", **llvm-nm** does not print an address for any symbol,
82 even symbols which are defined in the bitcode file.
92 Use POSIX.2 output format. Alias for **--format=posix**.
98 Use BSD output format. Alias for **--format=bsd**.
104 Print a summary of command-line options and their meanings.
110 Print only symbols defined in this bitcode file (as opposed to
111 symbols which may be referenced by objects in this file, but not
112 defined in this file.)
116 **--extern-only**, **-g**
118 Print only symbols whose definitions are external; that is, accessible
119 from other bitcode files.
123 **--undefined-only**, **-u**
125 Print only symbols referenced but not defined in this bitcode file.
130 Select an output format; *fmt* may be *sysv*, *posix*, or *bsd*. The
140 **llvm-nm** cannot demangle C++ mangled names, like GNU **nm** can.
147 **llvm-nm** exits with an exit code of zero.
154 llvm-dis|llvm-dis, ar(1), nm(1)