1 =pod 2 3 =head1 NAME 4 5 llvm-nm - list LLVM bitcode file's symbol table 6 7 =head1 SYNOPSIS 8 9 B<llvm-nm> [I<options>] [I<filenames...>] 10 11 =head1 DESCRIPTION 12 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. 18 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. 24 25 Type code characters currently supported, and their meanings, are as follows: 26 27 =over 28 29 =item U 30 31 Named object is referenced but undefined in this bitcode file 32 33 =item C 34 35 Common (multiple definitions link together into one def) 36 37 =item W 38 39 Weak reference (multiple definitions link together into zero or one definitions) 40 41 =item t 42 43 Local function (text) object 44 45 =item T 46 47 Global function (text) object 48 49 =item d 50 51 Local data object 52 53 =item D 54 55 Global data object 56 57 =item ? 58 59 Something unrecognizable 60 61 =back 62 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. 67 68 =head1 OPTIONS 69 70 =over 71 72 =item B<-P> 73 74 Use POSIX.2 output format. Alias for B<--format=posix>. 75 76 =item B<-B> (default) 77 78 Use BSD output format. Alias for B<--format=bsd>. 79 80 =item B<-help> 81 82 Print a summary of command-line options and their meanings. 83 84 =item B<--defined-only> 85 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.) 89 90 =item B<--extern-only>, B<-g> 91 92 Print only symbols whose definitions are external; that is, accessible 93 from other bitcode files. 94 95 =item B<--undefined-only>, B<-u> 96 97 Print only symbols referenced but not defined in this bitcode file. 98 99 =item B<--format=>I<fmt>, B<-f> 100 101 Select an output format; I<fmt> may be I<sysv>, I<posix>, or I<bsd>. The 102 default is I<bsd>. 103 104 =back 105 106 =head1 BUGS 107 108 B<llvm-nm> cannot demangle C++ mangled names, like GNU B<nm> can. 109 110 =head1 EXIT STATUS 111 112 B<llvm-nm> exits with an exit code of zero. 113 114 =head1 SEE ALSO 115 116 L<llvm-dis|llvm-dis>, ar(1), nm(1) 117 118 =head1 AUTHOR 119 120 Maintained by the LLVM Team (L<http://llvm.org/>). 121 122 =cut 123