]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - usr.bin/clang/llvm-nm/llvm-nm.1
Import CK as of commit 0f017230ccc86929f56bf44ef2dca93d7df8076b.
[FreeBSD/FreeBSD.git] / usr.bin / clang / llvm-nm / llvm-nm.1
1 .\" $FreeBSD$
2 .\" Man page generated from reStructuredText.
3 .
4 .TH "LLVM-NM" "1" "2017-12-24" "6" "LLVM"
5 .SH NAME
6 llvm-nm \- list LLVM bitcode and object file's symbol table
7 .
8 .nr rst2man-indent-level 0
9 .
10 .de1 rstReportMargin
11 \\$1 \\n[an-margin]
12 level \\n[rst2man-indent-level]
13 level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
14 -
15 \\n[rst2man-indent0]
16 \\n[rst2man-indent1]
17 \\n[rst2man-indent2]
18 ..
19 .de1 INDENT
20 .\" .rstReportMargin pre:
21 . RS \\$1
22 . nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
23 . nr rst2man-indent-level +1
24 .\" .rstReportMargin post:
25 ..
26 .de UNINDENT
27 . RE
28 .\" indent \\n[an-margin]
29 .\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
30 .nr rst2man-indent-level -1
31 .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
32 .in \\n[rst2man-indent\\n[rst2man-indent-level]]u
33 ..
34 .SH SYNOPSIS
35 .sp
36 \fBllvm\-nm\fP [\fIoptions\fP] [\fIfilenames...\fP]
37 .SH DESCRIPTION
38 .sp
39 The \fBllvm\-nm\fP utility lists the names of symbols from the LLVM bitcode
40 files, object files, or \fBar\fP archives containing them, named on the
41 command line.  Each symbol is listed along with some simple information about
42 its provenance.  If no file name is specified, or \fI\-\fP is used as a file name,
43 \fBllvm\-nm\fP will process a file on its standard input stream.
44 .sp
45 \fBllvm\-nm\fP\(aqs default output format is the traditional BSD \fBnm\fP
46 output format.  Each such output record consists of an (optional) 8\-digit
47 hexadecimal address, followed by a type code character, followed by a name, for
48 each symbol.  One record is printed per line; fields are separated by spaces.
49 When the address is omitted, it is replaced by 8 spaces.
50 .sp
51 Type code characters currently supported, and their meanings, are as follows:
52 .sp
53 U
54 .INDENT 0.0
55 .INDENT 3.5
56 Named object is referenced but undefined in this bitcode file
57 .UNINDENT
58 .UNINDENT
59 .sp
60 C
61 .INDENT 0.0
62 .INDENT 3.5
63 Common (multiple definitions link together into one def)
64 .UNINDENT
65 .UNINDENT
66 .sp
67 W
68 .INDENT 0.0
69 .INDENT 3.5
70 Weak reference (multiple definitions link together into zero or one definitions)
71 .UNINDENT
72 .UNINDENT
73 .sp
74 t
75 .INDENT 0.0
76 .INDENT 3.5
77 Local function (text) object
78 .UNINDENT
79 .UNINDENT
80 .sp
81 T
82 .INDENT 0.0
83 .INDENT 3.5
84 Global function (text) object
85 .UNINDENT
86 .UNINDENT
87 .sp
88 d
89 .INDENT 0.0
90 .INDENT 3.5
91 Local data object
92 .UNINDENT
93 .UNINDENT
94 .sp
95 D
96 .INDENT 0.0
97 .INDENT 3.5
98 Global data object
99 .UNINDENT
100 .UNINDENT
101 .sp
102 ?
103 .INDENT 0.0
104 .INDENT 3.5
105 Something unrecognizable
106 .UNINDENT
107 .UNINDENT
108 .sp
109 Because LLVM bitcode files typically contain objects that are not considered to
110 have addresses until they are linked into an executable image or dynamically
111 compiled "just\-in\-time", \fBllvm\-nm\fP does not print an address for any
112 symbol in an LLVM bitcode file, even symbols which are defined in the bitcode
113 file.
114 .SH OPTIONS
115 .INDENT 0.0
116 .TP
117 .B \-B    (default)
118 Use BSD output format.  Alias for \fI\-\-format=bsd\fP\&.
119 .UNINDENT
120 .INDENT 0.0
121 .TP
122 .B \-P
123 Use POSIX.2 output format.  Alias for \fI\-\-format=posix\fP\&.
124 .UNINDENT
125 .INDENT 0.0
126 .TP
127 .B \-\-debug\-syms, \-a
128 Show all symbols, even debugger only.
129 .UNINDENT
130 .INDENT 0.0
131 .TP
132 .B \-\-defined\-only
133 Print only symbols defined in this file (as opposed to
134 symbols which may be referenced by objects in this file, but not
135 defined in this file.)
136 .UNINDENT
137 .INDENT 0.0
138 .TP
139 .B \-\-dynamic, \-D
140 Display dynamic symbols instead of normal symbols.
141 .UNINDENT
142 .INDENT 0.0
143 .TP
144 .B \-\-extern\-only, \-g
145 Print only symbols whose definitions are external; that is, accessible
146 from other files.
147 .UNINDENT
148 .INDENT 0.0
149 .TP
150 .B \-\-format=format, \-f format
151 Select an output format; \fIformat\fP may be \fIsysv\fP, \fIposix\fP, or \fIbsd\fP\&.  The default
152 is \fIbsd\fP\&.
153 .UNINDENT
154 .INDENT 0.0
155 .TP
156 .B \-help
157 Print a summary of command\-line options and their meanings.
158 .UNINDENT
159 .INDENT 0.0
160 .TP
161 .B \-\-no\-sort, \-p
162 Shows symbols in order encountered.
163 .UNINDENT
164 .INDENT 0.0
165 .TP
166 .B \-\-numeric\-sort, \-n, \-v
167 Sort symbols by address.
168 .UNINDENT
169 .INDENT 0.0
170 .TP
171 .B \-\-print\-file\-name, \-A, \-o
172 Precede each symbol with the file it came from.
173 .UNINDENT
174 .INDENT 0.0
175 .TP
176 .B \-\-print\-size, \-S
177 Show symbol size instead of address.
178 .UNINDENT
179 .INDENT 0.0
180 .TP
181 .B \-\-size\-sort
182 Sort symbols by size.
183 .UNINDENT
184 .INDENT 0.0
185 .TP
186 .B \-\-undefined\-only, \-u
187 Print only symbols referenced but not defined in this file.
188 .UNINDENT
189 .INDENT 0.0
190 .TP
191 .B \-\-radix=RADIX, \-t
192 Specify the radix of the symbol address(es). Values accepted d(decimal),
193 x(hexadecomal) and o(octal).
194 .UNINDENT
195 .SH BUGS
196 .INDENT 0.0
197 .INDENT 3.5
198 .INDENT 0.0
199 .IP \(bu 2
200 \fBllvm\-nm\fP does not support the full set of arguments that GNU
201 \fBnm\fP does.
202 .UNINDENT
203 .UNINDENT
204 .UNINDENT
205 .SH EXIT STATUS
206 .sp
207 \fBllvm\-nm\fP exits with an exit code of zero.
208 .SH SEE ALSO
209 .sp
210 llvm\-dis, ar(1), nm(1)
211 .SH AUTHOR
212 Maintained by The LLVM Team (http://llvm.org/).
213 .SH COPYRIGHT
214 2003-2017, LLVM Project
215 .\" Generated by docutils manpage writer.
216 .