5 llvm-nm - list LLVM bitcode file's symbol table
9 B<llvm-nm> [I<options>] [I<filenames...>]
13 The B<llvm-nm> utility lists the names of symbols from the LLVM bitcode files,
14 or B<ar> archives containing LLVM bitcode files, named on the command line.
15 Each symbol is listed along with some simple information about its provenance.
16 If no file name is specified, or I<-> is used as a file name, B<llvm-nm> will
17 process a bitcode file on its standard input stream.
19 B<llvm-nm>'s default output format is the traditional BSD B<nm> output format.
20 Each such output record consists of an (optional) 8-digit hexadecimal address,
21 followed by a type code character, followed by a name, for each symbol. One
22 record is printed per line; fields are separated by spaces. When the address is
23 omitted, it is replaced by 8 spaces.
25 Type code characters currently supported, and their meanings, are as follows:
31 Named object is referenced but undefined in this bitcode file
35 Common (multiple definitions link together into one def)
39 Weak reference (multiple definitions link together into zero or one definitions)
43 Local function (text) object
47 Global function (text) object
59 Something unrecognizable
63 Because LLVM bitcode files typically contain objects that are not considered to
64 have addresses until they are linked into an executable image or dynamically
65 compiled "just-in-time", B<llvm-nm> does not print an address for any symbol,
66 even symbols which are defined in the bitcode file.
74 Use POSIX.2 output format. Alias for B<--format=posix>.
78 Use BSD output format. Alias for B<--format=bsd>.
82 Print a summary of command-line options and their meanings.
84 =item B<--defined-only>
86 Print only symbols defined in this bitcode file (as opposed to
87 symbols which may be referenced by objects in this file, but not
88 defined in this file.)
90 =item B<--extern-only>, B<-g>
92 Print only symbols whose definitions are external; that is, accessible
93 from other bitcode files.
95 =item B<--undefined-only>, B<-u>
97 Print only symbols referenced but not defined in this bitcode file.
99 =item B<--format=>I<fmt>, B<-f>
101 Select an output format; I<fmt> may be I<sysv>, I<posix>, or I<bsd>. The
108 B<llvm-nm> cannot demangle C++ mangled names, like GNU B<nm> can.
112 B<llvm-nm> exits with an exit code of zero.
116 L<llvm-dis|llvm-dis>, ar(1), nm(1)
120 Maintained by the LLVM Team (L<http://llvm.org>).