• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1=pod
2
3=head1 NAME
4
5llvm-nm - list LLVM bitcode file's symbol table
6
7=head1 SYNOPSIS
8
9B<llvm-nm> [I<options>] [I<filenames...>]
10
11=head1 DESCRIPTION
12
13The B<llvm-nm> utility lists the names of symbols from the LLVM bitcode files,
14or B<ar> archives containing LLVM bitcode files, named on the command line.
15Each symbol is listed along with some simple information about its provenance.
16If no file name is specified, or I<-> is used as a file name, B<llvm-nm> will
17process a bitcode file on its standard input stream.
18
19B<llvm-nm>'s default output format is the traditional BSD B<nm> output format.
20Each such output record consists of an (optional) 8-digit hexadecimal address,
21followed by a type code character, followed by a name, for each symbol. One
22record is printed per line; fields are separated by spaces. When the address is
23omitted, it is replaced by 8 spaces.
24
25Type code characters currently supported, and their meanings, are as follows:
26
27=over
28
29=item U
30
31Named object is referenced but undefined in this bitcode file
32
33=item C
34
35Common (multiple definitions link together into one def)
36
37=item W
38
39Weak reference (multiple definitions link together into zero or one definitions)
40
41=item t
42
43Local function (text) object
44
45=item T
46
47Global function (text) object
48
49=item d
50
51Local data object
52
53=item D
54
55Global data object
56
57=item ?
58
59Something unrecognizable
60
61=back
62
63Because LLVM bitcode files typically contain objects that are not considered to
64have addresses until they are linked into an executable image or dynamically
65compiled "just-in-time", B<llvm-nm> does not print an address for any symbol,
66even symbols which are defined in the bitcode file.
67
68=head1 OPTIONS
69
70=over
71
72=item B<-P>
73
74Use POSIX.2 output format. Alias for B<--format=posix>.
75
76=item B<-B>    (default)
77
78Use BSD output format. Alias for B<--format=bsd>.
79
80=item B<-help>
81
82Print a summary of command-line options and their meanings.
83
84=item B<--defined-only>
85
86Print only symbols defined in this bitcode file (as opposed to
87symbols which may be referenced by objects in this file, but not
88defined in this file.)
89
90=item B<--extern-only>, B<-g>
91
92Print only symbols whose definitions are external; that is, accessible
93from other bitcode files.
94
95=item B<--undefined-only>, B<-u>
96
97Print only symbols referenced but not defined in this bitcode file.
98
99=item B<--format=>I<fmt>, B<-f>
100
101Select an output format; I<fmt> may be I<sysv>, I<posix>, or I<bsd>. The
102default is I<bsd>.
103
104=back
105
106=head1 BUGS
107
108B<llvm-nm> cannot demangle C++ mangled names, like GNU B<nm> can.
109
110=head1 EXIT STATUS
111
112B<llvm-nm> exits with an exit code of zero.
113
114=head1 SEE ALSO
115
116L<llvm-dis|llvm-dis>, ar(1), nm(1)
117
118=head1 AUTHOR
119
120Maintained by the LLVM Team (L<http://llvm.org/>).
121
122=cut
123