1LLVM-NM(1)                           LLVM                           LLVM-NM(1)
2
3
4

NAME

6       llvm-nm - list LLVM bitcode and object file's symbol table
7

SYNOPSIS

9       llvm-nm [options] [filenames...]
10

DESCRIPTION

12       The  llvm-nm  utility  lists the names of symbols from the LLVM bitcode
13       files, object files, or ar archives containing them, named on the  com‐
14       mand  line.   Each  symbol is listed along with some simple information
15       about its provenance.  If no file name is specified, or - is used as  a
16       file name, llvm-nm will process a file on its standard input stream.
17
18       llvm-nm's  default  output format is the traditional BSD nm output for‐
19       mat.  Each such output record consists of an (optional)  8-digit  hexa‐
20       decimal address, followed by a type code character, followed by a name,
21       for each symbol.  One record is printed per line; fields are  separated
22       by spaces.  When the address is omitted, it is replaced by 8 spaces.
23
24       Type  code  characters  currently supported, and their meanings, are as
25       follows:
26
27       U
28          Named object is referenced but undefined in this bitcode file
29
30       C
31          Common (multiple definitions link together into one def)
32
33       W
34          Weak reference (multiple definitions link together into zero or  one
35          definitions)
36
37       t
38          Local function (text) object
39
40       T
41          Global function (text) object
42
43       d
44          Local data object
45
46       D
47          Global data object
48
49       ?
50          Something unrecognizable
51
52       Because  LLVM bitcode files typically contain objects that are not con‐
53       sidered to have addresses until they  are  linked  into  an  executable
54       image or dynamically compiled "just-in-time", llvm-nm does not print an
55       address for any symbol in an LLVM bitcode file, even symbols which  are
56       defined in the bitcode file.
57

OPTIONS

59       -B (default)
60              Use BSD output format.  Alias for --format=bsd.
61
62       -P     Use POSIX.2 output format.  Alias for --format=posix.
63
64       --debug-syms, -a
65              Show all symbols, even debugger only.
66
67       --defined-only
68              Print  only  symbols defined in this file (as opposed to symbols
69              which may be referenced by objects in this file, but not defined
70              in this file.)
71
72       --dynamic, -D
73              Display dynamic symbols instead of normal symbols.
74
75       --extern-only, -g
76              Print  only  symbols  whose  definitions  are external; that is,
77              accessible from other files.
78
79       --format=format, -f format
80              Select an output format; format may be sysv, posix, or bsd.  The
81              default is bsd.
82
83       -help  Print a summary of command-line options and their meanings.
84
85       --no-sort, -p
86              Shows symbols in order encountered.
87
88       --numeric-sort, -n, -v
89              Sort symbols by address.
90
91       --print-file-name, -A, -o
92              Precede each symbol with the file it came from.
93
94       --print-size, -S
95              Show symbol size instead of address.
96
97       --size-sort
98              Sort symbols by size.
99
100       --undefined-only, -u
101              Print only symbols referenced but not defined in this file.
102
103       --radix=RADIX, -t
104              Specify  the  radix  of  the symbol address(es). Values accepted
105              d(decimal), x(hexadecomal) and o(octal).
106

BUGS

108          · llvm-nm cannot demangle C++ mangled names, like GNU nm can.
109
110          · llvm-nm does not support the full set of  arguments  that  GNU  nm
111            does.
112

EXIT STATUS

114       llvm-nm exits with an exit code of zero.
115

SEE ALSO

117       llvm-dis, ar(1), nm(1)
118

AUTHOR

120       Maintained by The LLVM Team (http://llvm.org/).
121
123       2003-2019, LLVM Project
124
125
126
127
1283.9                               2019-02-01                        LLVM-NM(1)
Impressum