8 <center><h1>LLVM: <tt>llvm-nm</tt> tool</h1></center>
15 <tt>llvm-nm [options] [filenames...]</tt>
19 <p>The <tt>llvm-nm</tt> utility lists the names of symbols from the
20 LLVM bytecode files, or <tt>ar(1)</tt> archives containing LLVM
21 bytecode files, named on the command line. Each symbol is listed along
22 with some simple information about its provenance. If no filename is specified,
23 or - is used as a filename, <tt>llvm-nm</tt> will process a bytecode file
24 on its standard input stream.</p>
26 <p><tt>llvm-nm</tt>'s default output format is the traditional BSD
27 <tt>nm(1)</tt> output format. Each such output record consists of an
28 (optional) 8-digit hexadecimal address, followed by a type code
29 character, followed by a name, for each symbol. One record is printed
30 per line; fields are separated by spaces. When the address is omitted,
31 it is replaced by 8 spaces.</p>
33 <p>Type code characters currently supported, and their meanings, are
37 <tr><td>U</td><td>Named object is referenced but undefined in this
38 bytecode file</td></tr>
39 <tr><td>C</td><td>Common (multiple defs link together into one
41 <tr><td>W</td><td>Weak reference (multiple defs link together into zero or
43 <tr><td>t</td><td>Local function (text) object</td></tr>
44 <tr><td>T</td><td>Global function (text) object</td></tr>
45 <tr><td>d</td><td>Local data object</td></tr>
46 <tr><td>D</td><td>Global data object</td></tr>
47 <tr><td>?</td><td>Something unrecognizable</td></tr>
50 <p>Because LLVM bytecode files typically contain objects that are not
51 considered to have addresses until they are linked into an executable
52 image or dynamically compiled "just-in-time", <tt>llvm-nm</tt> does
53 not print an address for any symbol, even symbols which are defined in
54 the bytecode file.</p>
61 Use POSIX.2 output format. Alias for --format=posix.
65 Use BSD output format. Alias for --format=bsd.
70 Print a summary of command-line options and their meanings.
75 Print only symbols defined in this bytecode file (as opposed
76 to symbols which may be referenced by objects in this file,
77 but not defined in this file.)
82 Print only symbols whose definitions are external; that is,
83 accessible from other bytecode files.
86 <li> -undefined-only, -u
88 Print only symbols referenced but not defined in this bytecode
92 <li> -format=<i>fmt</i>, -f
94 Select an output format; <i>fmt</i> may be sysv, posix, or
95 bsd. The default is bsd.
101 <tt>llvm-nm</tt> cannot demangle C++ mangled
102 names, like GNU <tt>nm(1)</tt> can.
106 <tt>llvm-nm</tt> exits with an exit code of zero.
110 <a href="llvm-dis.html"><tt>llvm-dis</tt></a>,
115 Maintained by the <a href="http://llvm.cs.uiuc.edu">LLVM Team</a>.