]> CyberLeo.Net >> Repos - FreeBSD/releng/9.2.git/blob - usr.bin/clang/llvm-nm/llvm-nm.1
- Copy stable/9 to releng/9.2 as part of the 9.2-RELEASE cycle.
[FreeBSD/releng/9.2.git] / usr.bin / clang / llvm-nm / llvm-nm.1
1 .\" $FreeBSD$
2 .TH "LLVM-NM" "1" "2013-04-11" "3.3" "LLVM"
3 .SH NAME
4 llvm-nm \- list LLVM bitcode and object file's symbol table
5 .
6 .nr rst2man-indent-level 0
7 .
8 .de1 rstReportMargin
9 \\$1 \\n[an-margin]
10 level \\n[rst2man-indent-level]
11 level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
12 -
13 \\n[rst2man-indent0]
14 \\n[rst2man-indent1]
15 \\n[rst2man-indent2]
16 ..
17 .de1 INDENT
18 .\" .rstReportMargin pre:
19 . RS \\$1
20 . nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
21 . nr rst2man-indent-level +1
22 .\" .rstReportMargin post:
23 ..
24 .de UNINDENT
25 . RE
26 .\" indent \\n[an-margin]
27 .\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
28 .nr rst2man-indent-level -1
29 .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
30 .in \\n[rst2man-indent\\n[rst2man-indent-level]]u
31 ..
32 .\" Man page generated from reStructuredText.
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 its
42 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 a 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 .SH BUGS
190 .INDENT 0.0
191 .INDENT 3.5
192 .INDENT 0.0
193 .IP \(bu 2
194 \fBllvm\-nm\fP cannot demangle C++ mangled names, like GNU \fBnm\fP
195 can.
196 .IP \(bu 2
197 \fBllvm\-nm\fP does not support the full set of arguments that GNU
198 \fBnm\fP does.
199 .UNINDENT
200 .UNINDENT
201 .UNINDENT
202 .SH EXIT STATUS
203 .sp
204 \fBllvm\-nm\fP exits with an exit code of zero.
205 .SH SEE ALSO
206 .sp
207 llvm\-dis|llvm\-dis, ar(1), nm(1)
208 .SH AUTHOR
209 Maintained by The LLVM Team (http://llvm.org/).
210 .SH COPYRIGHT
211 2003-2013, LLVM Project
212 .\" Generated by docutils manpage writer.
213 .