1LLVM-NM(1) LLVM LLVM-NM(1)
2
3
4
6 llvm-nm - list LLVM bitcode and object 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, object files, or ar archives containing them, named on the com‐
14 mand 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 file on its standard input stream.
17
18 llvm-nm's default output format is the traditional BSD nm output for‐
19 mat. Each such output record consists of an (optional) 8-digit hexa‐
20 decimal address, followed by a type code character, followed by a name,
21 for each symbol. One record is printed per line; fields are separated
22 by spaces. When the address is omitted, it is replaced by 8 spaces.
23
24 Type code characters currently supported, and their meanings, are as
25 follows:
26
27 U
28 Named object is referenced but undefined in this bitcode file
29
30 C
31 Common (multiple definitions link together into one def)
32
33 W
34 Weak reference (multiple definitions link together into zero or one
35 definitions)
36
37 t
38 Local function (text) object
39
40 T
41 Global function (text) object
42
43 d
44 Local data object
45
46 D
47 Global data object
48
49 ?
50 Something unrecognizable
51
52 Because LLVM bitcode files typically contain objects that are not con‐
53 sidered to have addresses until they are linked into an executable im‐
54 age or dynamically compiled "just-in-time", llvm-nm does not print an
55 address for any symbol in an LLVM bitcode file, even symbols which are
56 defined in the bitcode file.
57
59 -B (default)
60 Use BSD output format. Alias for --format=bsd.
61
62 -P Use POSIX.2 output format. Alias for --format=posix.
63
64 --debug-syms, -a
65 Show all symbols, even debugger only.
66
67 --defined-only
68 Print only symbols defined in this file (as opposed to symbols
69 which may be referenced by objects in this file, but not defined
70 in this file.)
71
72 --dynamic, -D
73 Display dynamic symbols instead of normal symbols.
74
75 --extern-only, -g
76 Print only symbols whose definitions are external; that is, ac‐
77 cessible from other files.
78
79 --no-weak, -W
80 Don't print any weak symbols in the output.
81
82 --format=format, -f format
83 Select an output format; format may be sysv, posix, or bsd. The
84 default is bsd.
85
86 -help Print a summary of command-line options and their meanings.
87
88 --no-sort, -p
89 Shows symbols in order encountered.
90
91 --numeric-sort, -n, -v
92 Sort symbols by address.
93
94 --print-file-name, -A, -o
95 Precede each symbol with the file it came from.
96
97 --print-size, -S
98 Show symbol size instead of address.
99
100 --size-sort
101 Sort symbols by size.
102
103 --undefined-only, -u
104 Print only symbols referenced but not defined in this file.
105
106 --radix=RADIX, -t
107 Specify the radix of the symbol address(es). Values accepted
108 d(decimal), x(hexadecomal) and o(octal).
109
111 • llvm-nm does not support the full set of arguments that GNU nm
112 does.
113
115 llvm-nm exits with an exit code of zero.
116
118 llvm-dis, ar(1), nm(1)
119
121 Maintained by The LLVM Team (http://llvm.org/).
122
124 2003-2021, LLVM Project
125
126
127
128
1297 2021-03-30 LLVM-NM(1)