1LLVM-NM(1) LLVM Command Guide LLVM-NM(1)
2
3
4
6 llvm-nm - list LLVM bitcode file's symbol table
7
9 llvm-nm [options] [filenames...]
10
12 The llvm-nm utility lists the names of symbols from the LLVM bitcode
13 files, or ar archives containing LLVM bitcode files, named on the
14 command line. Each symbol is listed along with some simple information
15 about its provenance. If no file name is specified, or - is used as a
16 file name, llvm-nm will process a bitcode file on its standard input
17 stream.
18
19 llvm-nm's default output format is the traditional BSD nm output
20 format. Each such output record consists of an (optional) 8-digit
21 hexadecimal address, followed by a type code character, followed by a
22 name, for each symbol. One record is printed per line; fields are
23 separated by spaces. When the address is omitted, it is replaced by 8
24 spaces.
25
26 Type code characters currently supported, and their meanings, are as
27 follows:
28
29 U Named object is referenced but undefined in this bitcode file
30
31 C Common (multiple definitions link together into one def)
32
33 W Weak reference (multiple definitions link together into zero or one
34 definitions)
35
36 t Local function (text) object
37
38 T Global function (text) object
39
40 d Local data object
41
42 D Global data object
43
44 ? Something unrecognizable
45
46 Because LLVM bitcode files typically contain objects that are not
47 considered to have addresses until they are linked into an executable
48 image or dynamically compiled "just-in-time", llvm-nm does not print an
49 address for any symbol, even symbols which are defined in the bitcode
50 file.
51
53 -P Use POSIX.2 output format. Alias for --format=posix.
54
55 -B (default)
56 Use BSD output format. Alias for --format=bsd.
57
58 -help
59 Print a summary of command-line options and their meanings.
60
61 --defined-only
62 Print only symbols defined in this bitcode file (as opposed to
63 symbols which may be referenced by objects in this file, but not
64 defined in this file.)
65
66 --extern-only, -g
67 Print only symbols whose definitions are external; that is,
68 accessible from other bitcode files.
69
70 --undefined-only, -u
71 Print only symbols referenced but not defined in this bitcode file.
72
73 --format=fmt, -f
74 Select an output format; fmt may be sysv, posix, or bsd. The
75 default is bsd.
76
78 llvm-nm cannot demangle C++ mangled names, like GNU nm can.
79
81 llvm-nm exits with an exit code of zero.
82
84 llvm-dis, ar(1), nm(1)
85
87 Maintained by the LLVM Team (<http://llvm.org>).
88
89
90
91CVS 2010-05-07 LLVM-NM(1)