| 1 |
.\" -*- mode: troff; coding: utf-8 -*- |
| 2 |
.\" Automatically generated by Pod::Man 5.0102 (Pod::Simple 3.45) |
| 3 |
.\" |
| 4 |
.\" Standard preamble: |
| 5 |
.\" ======================================================================== |
| 6 |
.de Sp \" Vertical space (when we can't use .PP) |
| 7 |
.if t .sp .5v |
| 8 |
.if n .sp |
| 9 |
.. |
| 10 |
.de Vb \" Begin verbatim text |
| 11 |
.ft CW |
| 12 |
.nf |
| 13 |
.ne \\$1 |
| 14 |
.. |
| 15 |
.de Ve \" End verbatim text |
| 16 |
.ft R |
| 17 |
.fi |
| 18 |
.. |
| 19 |
.\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>. |
| 20 |
.ie n \{\ |
| 21 |
. ds C` "" |
| 22 |
. ds C' "" |
| 23 |
'br\} |
| 24 |
.el\{\ |
| 25 |
. ds C` |
| 26 |
. ds C' |
| 27 |
'br\} |
| 28 |
.\" |
| 29 |
.\" Escape single quotes in literal strings from groff's Unicode transform. |
| 30 |
.ie \n(.g .ds Aq \(aq |
| 31 |
.el .ds Aq ' |
| 32 |
.\" |
| 33 |
.\" If the F register is >0, we'll generate index entries on stderr for |
| 34 |
.\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index |
| 35 |
.\" entries marked with X<> in POD. Of course, you'll have to process the |
| 36 |
.\" output yourself in some meaningful fashion. |
| 37 |
.\" |
| 38 |
.\" Avoid warning from groff about undefined register 'F'. |
| 39 |
.de IX |
| 40 |
.. |
| 41 |
.nr rF 0 |
| 42 |
.if \n(.g .if rF .nr rF 1 |
| 43 |
.if (\n(rF:(\n(.g==0)) \{\ |
| 44 |
. if \nF \{\ |
| 45 |
. de IX |
| 46 |
. tm Index:\\$1\t\\n%\t"\\$2" |
| 47 |
.. |
| 48 |
. if !\nF==2 \{\ |
| 49 |
. nr % 0 |
| 50 |
. nr F 2 |
| 51 |
. \} |
| 52 |
. \} |
| 53 |
.\} |
| 54 |
.rr rF |
| 55 |
.\" ======================================================================== |
| 56 |
.\" |
| 57 |
.IX Title "NM 1" |
| 58 |
.TH NM 1 2026-03-05 binutils-2.46 "GNU Development Tools" |
| 59 |
.\" For nroff, turn off justification. Always turn off hyphenation; it makes |
| 60 |
.\" way too many mistakes in technical documents. |
| 61 |
.if n .ad l |
| 62 |
.nh |
| 63 |
.SH NAME |
| 64 |
nm \- list symbols from object files |
| 65 |
.SH SYNOPSIS |
| 66 |
.IX Header "SYNOPSIS" |
| 67 |
nm [\fB\-A\fR|\fB\-o\fR|\fB\-\-print\-file\-name\fR] |
| 68 |
[\fB\-a\fR|\fB\-\-debug\-syms\fR] |
| 69 |
[\fB\-B\fR|\fB\-\-format=bsd\fR] |
| 70 |
[\fB\-C\fR|\fB\-\-demangle\fR[=\fIstyle\fR]] |
| 71 |
[\fB\-D\fR|\fB\-\-dynamic\fR] |
| 72 |
[\fB\-f\fR\fIformat\fR|\fB\-\-format=\fR\fIformat\fR] |
| 73 |
[\fB\-g\fR|\fB\-\-extern\-only\fR] |
| 74 |
[\fB\-h\fR|\fB\-\-help\fR] |
| 75 |
[\fB\-\-ifunc\-chars=\fR\fICHARS\fR] |
| 76 |
[\fB\-j\fR|\fB\-\-format=just\-symbols\fR] |
| 77 |
[\fB\-l\fR|\fB\-\-line\-numbers\fR] [\fB\-\-inlines\fR] |
| 78 |
[\fB\-n\fR|\fB\-v\fR|\fB\-\-numeric\-sort\fR] |
| 79 |
[\fB\-P\fR|\fB\-\-portability\fR] |
| 80 |
[\fB\-p\fR|\fB\-\-no\-sort\fR] |
| 81 |
[\fB\-r\fR|\fB\-\-reverse\-sort\fR] |
| 82 |
[\fB\-S\fR|\fB\-\-print\-size\fR] |
| 83 |
[\fB\-s\fR|\fB\-\-print\-armap\fR] |
| 84 |
[\fB\-t\fR \fIradix\fR|\fB\-\-radix=\fR\fIradix\fR] |
| 85 |
[\fB\-u\fR|\fB\-\-undefined\-only\fR] |
| 86 |
[\fB\-U\fR|\fB\-\-defined\-only\fR] |
| 87 |
[\fB\-V\fR|\fB\-\-version\fR] |
| 88 |
[\fB\-W\fR|\fB\-\-no\-weak\fR] |
| 89 |
[\fB\-X 32_64\fR] |
| 90 |
[\fB\-\-no\-demangle\fR] |
| 91 |
[\fB\-\-no\-recurse\-limit\fR|\fB\-\-recurse\-limit\fR]] |
| 92 |
[\fB\-\-plugin\fR \fIname\fR] |
| 93 |
[\fB\-\-size\-sort\fR] |
| 94 |
[\fB\-\-special\-syms\fR] |
| 95 |
[\fB\-\-synthetic\fR] |
| 96 |
[\fB\-\-target=\fR\fIbfdname\fR] |
| 97 |
[\fB\-\-unicode=\fR\fImethod\fR] |
| 98 |
[\fB\-\-with\-symbol\-versions\fR] |
| 99 |
[\fB\-\-without\-symbol\-versions\fR] |
| 100 |
[\fIobjfile\fR...] |
| 101 |
.SH DESCRIPTION |
| 102 |
.IX Header "DESCRIPTION" |
| 103 |
GNU \fBnm\fR lists the symbols from object files \fIobjfile\fR.... |
| 104 |
If no object files are listed as arguments, \fBnm\fR assumes the file |
| 105 |
\&\fIa.out\fR. |
| 106 |
.PP |
| 107 |
For each symbol, \fBnm\fR shows: |
| 108 |
.IP \(bu 4 |
| 109 |
The symbol value, in the radix selected by options (see below), or |
| 110 |
hexadecimal by default. |
| 111 |
.IP \(bu 4 |
| 112 |
The symbol type. At least the following types are used; others are, as |
| 113 |
well, depending on the object file format. If lowercase, the symbol is |
| 114 |
usually local; if uppercase, the symbol is global (external). There |
| 115 |
are however a few lowercase symbols that are shown for special global |
| 116 |
symbols (\f(CW\*(C`u\*(C'\fR, \f(CW\*(C`v\*(C'\fR and \f(CW\*(C`w\*(C'\fR). |
| 117 |
.RS 4 |
| 118 |
.ie n .IP """A""" 4 |
| 119 |
.el .IP \f(CWA\fR 4 |
| 120 |
.IX Item "A" |
| 121 |
The symbol's value is absolute, and will not be changed by further |
| 122 |
linking. |
| 123 |
.ie n .IP """B""" 4 |
| 124 |
.el .IP \f(CWB\fR 4 |
| 125 |
.IX Item "B" |
| 126 |
.PD 0 |
| 127 |
.ie n .IP """b""" 4 |
| 128 |
.el .IP \f(CWb\fR 4 |
| 129 |
.IX Item "b" |
| 130 |
.PD |
| 131 |
The symbol is in the BSS data section. This section typically |
| 132 |
contains zero-initialized or uninitialized data, although the exact |
| 133 |
behavior is system dependent. |
| 134 |
.ie n .IP """C""" 4 |
| 135 |
.el .IP \f(CWC\fR 4 |
| 136 |
.IX Item "C" |
| 137 |
.PD 0 |
| 138 |
.ie n .IP """c""" 4 |
| 139 |
.el .IP \f(CWc\fR 4 |
| 140 |
.IX Item "c" |
| 141 |
.PD |
| 142 |
The symbol is common. Common symbols are uninitialized data. When |
| 143 |
linking, multiple common symbols may appear with the same name. If the |
| 144 |
symbol is defined anywhere, the common symbols are treated as undefined |
| 145 |
references. |
| 146 |
The lower case \fIc\fR character is used when the symbol is in a |
| 147 |
special section for small commons. |
| 148 |
.ie n .IP """D""" 4 |
| 149 |
.el .IP \f(CWD\fR 4 |
| 150 |
.IX Item "D" |
| 151 |
.PD 0 |
| 152 |
.ie n .IP """d""" 4 |
| 153 |
.el .IP \f(CWd\fR 4 |
| 154 |
.IX Item "d" |
| 155 |
.PD |
| 156 |
The symbol is in the initialized data section. |
| 157 |
.ie n .IP """G""" 4 |
| 158 |
.el .IP \f(CWG\fR 4 |
| 159 |
.IX Item "G" |
| 160 |
.PD 0 |
| 161 |
.ie n .IP """g""" 4 |
| 162 |
.el .IP \f(CWg\fR 4 |
| 163 |
.IX Item "g" |
| 164 |
.PD |
| 165 |
The symbol is in an initialized data section for small objects. Some |
| 166 |
object file formats permit more efficient access to small data objects, |
| 167 |
such as a global int variable as opposed to a large global array. |
| 168 |
.ie n .IP """i""" 4 |
| 169 |
.el .IP \f(CWi\fR 4 |
| 170 |
.IX Item "i" |
| 171 |
For PE format files this indicates that the symbol is in a section |
| 172 |
specific to the implementation of DLLs. |
| 173 |
.Sp |
| 174 |
For ELF format files this indicates that the symbol is an indirect |
| 175 |
function. This is a GNU extension to the standard set of ELF symbol |
| 176 |
types. It indicates a symbol which if referenced by a relocation does |
| 177 |
not evaluate to its address, but instead must be invoked at runtime. |
| 178 |
The runtime execution will then return the value to be used in the |
| 179 |
relocation. |
| 180 |
.Sp |
| 181 |
Note \- the actual symbols display for GNU indirect symbols is |
| 182 |
controlled by the \fB\-\-ifunc\-chars\fR command line option. If this |
| 183 |
option has been provided then the first character in the string will |
| 184 |
be used for global indirect function symbols. If the string contains |
| 185 |
a second character then that will be used for local indirect function |
| 186 |
symbols. |
| 187 |
.ie n .IP """I""" 4 |
| 188 |
.el .IP \f(CWI\fR 4 |
| 189 |
.IX Item "I" |
| 190 |
The symbol is an indirect reference to another symbol. |
| 191 |
.ie n .IP """N""" 4 |
| 192 |
.el .IP \f(CWN\fR 4 |
| 193 |
.IX Item "N" |
| 194 |
The symbol is a debugging symbol. |
| 195 |
.ie n .IP """n""" 4 |
| 196 |
.el .IP \f(CWn\fR 4 |
| 197 |
.IX Item "n" |
| 198 |
The symbol is in a non-data, non-code, non-debug read-only section. |
| 199 |
.ie n .IP """p""" 4 |
| 200 |
.el .IP \f(CWp\fR 4 |
| 201 |
.IX Item "p" |
| 202 |
The symbol is in a stack unwind section. |
| 203 |
.ie n .IP """R""" 4 |
| 204 |
.el .IP \f(CWR\fR 4 |
| 205 |
.IX Item "R" |
| 206 |
.PD 0 |
| 207 |
.ie n .IP """r""" 4 |
| 208 |
.el .IP \f(CWr\fR 4 |
| 209 |
.IX Item "r" |
| 210 |
.PD |
| 211 |
The symbol is in a read only data section. |
| 212 |
.ie n .IP """S""" 4 |
| 213 |
.el .IP \f(CWS\fR 4 |
| 214 |
.IX Item "S" |
| 215 |
.PD 0 |
| 216 |
.ie n .IP """s""" 4 |
| 217 |
.el .IP \f(CWs\fR 4 |
| 218 |
.IX Item "s" |
| 219 |
.PD |
| 220 |
The symbol is in an uninitialized or zero-initialized data section |
| 221 |
for small objects. |
| 222 |
.ie n .IP """T""" 4 |
| 223 |
.el .IP \f(CWT\fR 4 |
| 224 |
.IX Item "T" |
| 225 |
.PD 0 |
| 226 |
.ie n .IP """t""" 4 |
| 227 |
.el .IP \f(CWt\fR 4 |
| 228 |
.IX Item "t" |
| 229 |
.PD |
| 230 |
The symbol is in the text (code) section. |
| 231 |
.ie n .IP """U""" 4 |
| 232 |
.el .IP \f(CWU\fR 4 |
| 233 |
.IX Item "U" |
| 234 |
The symbol is undefined. |
| 235 |
.ie n .IP """u""" 4 |
| 236 |
.el .IP \f(CWu\fR 4 |
| 237 |
.IX Item "u" |
| 238 |
The symbol is a unique global symbol. This is a GNU extension to the |
| 239 |
standard set of ELF symbol bindings. For such a symbol the dynamic linker |
| 240 |
will make sure that in the entire process there is just one symbol with |
| 241 |
this name and type in use. |
| 242 |
.ie n .IP """V""" 4 |
| 243 |
.el .IP \f(CWV\fR 4 |
| 244 |
.IX Item "V" |
| 245 |
.PD 0 |
| 246 |
.ie n .IP """v""" 4 |
| 247 |
.el .IP \f(CWv\fR 4 |
| 248 |
.IX Item "v" |
| 249 |
.PD |
| 250 |
The symbol is a weak object. When a weak defined symbol is linked with |
| 251 |
a normal defined symbol, the normal defined symbol is used with no error. |
| 252 |
When a weak undefined symbol is linked and the symbol is not defined, |
| 253 |
the value of the weak symbol becomes zero with no error. On some |
| 254 |
systems, uppercase indicates that a default value has been specified. |
| 255 |
.ie n .IP """W""" 4 |
| 256 |
.el .IP \f(CWW\fR 4 |
| 257 |
.IX Item "W" |
| 258 |
.PD 0 |
| 259 |
.ie n .IP """w""" 4 |
| 260 |
.el .IP \f(CWw\fR 4 |
| 261 |
.IX Item "w" |
| 262 |
.PD |
| 263 |
The symbol is a weak symbol that has not been specifically tagged as a |
| 264 |
weak object symbol. When a weak defined symbol is linked with a normal |
| 265 |
defined symbol, the normal defined symbol is used with no error. |
| 266 |
When a weak undefined symbol is linked and the symbol is not defined, |
| 267 |
the value of the symbol is determined in a system-specific manner without |
| 268 |
error. On some systems, uppercase indicates that a default value has been |
| 269 |
specified. |
| 270 |
.ie n .IP """\-""" 4 |
| 271 |
.el .IP \f(CW\-\fR 4 |
| 272 |
.IX Item "-" |
| 273 |
The symbol is a stabs symbol in an a.out object file. In this case, the |
| 274 |
next values printed are the stabs other field, the stabs desc field, and |
| 275 |
the stab type. Stabs symbols are used to hold debugging information. |
| 276 |
.ie n .IP """?""" 4 |
| 277 |
.el .IP \f(CW?\fR 4 |
| 278 |
.IX Item "?" |
| 279 |
The symbol type is unknown, or object file format specific. |
| 280 |
.RE |
| 281 |
.RS 4 |
| 282 |
.RE |
| 283 |
.IP \(bu 4 |
| 284 |
The symbol name. If a symbol has version information associated with it, |
| 285 |
then the version information is displayed as well. If the versioned |
| 286 |
symbol is undefined or hidden from linker, the version string is displayed |
| 287 |
as a suffix to the symbol name, preceded by an @ character. For example |
| 288 |
\&\fBfoo@VER_1\fR. If the version is the default version to be used when |
| 289 |
resolving unversioned references to the symbol, then it is displayed as a |
| 290 |
suffix preceded by two @ characters. For example \fBfoo@@VER_2\fR. |
| 291 |
.SH OPTIONS |
| 292 |
.IX Header "OPTIONS" |
| 293 |
The long and short forms of options, shown here as alternatives, are |
| 294 |
equivalent. |
| 295 |
.IP \fB\-A\fR 4 |
| 296 |
.IX Item "-A" |
| 297 |
.PD 0 |
| 298 |
.IP \fB\-o\fR 4 |
| 299 |
.IX Item "-o" |
| 300 |
.IP \fB\-\-print\-file\-name\fR 4 |
| 301 |
.IX Item "--print-file-name" |
| 302 |
.PD |
| 303 |
Precede each symbol by the name of the input file (or archive member) |
| 304 |
in which it was found, rather than identifying the input file once only, |
| 305 |
before all of its symbols. |
| 306 |
.IP \fB\-a\fR 4 |
| 307 |
.IX Item "-a" |
| 308 |
.PD 0 |
| 309 |
.IP \fB\-\-debug\-syms\fR 4 |
| 310 |
.IX Item "--debug-syms" |
| 311 |
.PD |
| 312 |
Display all symbols, even debugger-only symbols; normally these are not |
| 313 |
listed. |
| 314 |
.IP \fB\-B\fR 4 |
| 315 |
.IX Item "-B" |
| 316 |
The same as \fB\-\-format=bsd\fR (for compatibility with the MIPS \fBnm\fR). |
| 317 |
.IP \fB\-C\fR 4 |
| 318 |
.IX Item "-C" |
| 319 |
.PD 0 |
| 320 |
.IP \fB\-\-demangle[=\fR\fIstyle\fR\fB]\fR 4 |
| 321 |
.IX Item "--demangle[=style]" |
| 322 |
.PD |
| 323 |
Decode (\fIdemangle\fR) low-level symbol names into user-level names. |
| 324 |
Besides removing any initial underscore prepended by the system, this |
| 325 |
makes C++ function names readable. Different compilers have different |
| 326 |
mangling styles. The optional demangling style argument can be used to |
| 327 |
choose an appropriate demangling style for your compiler. |
| 328 |
.IP \fB\-\-no\-demangle\fR 4 |
| 329 |
.IX Item "--no-demangle" |
| 330 |
Do not demangle low-level symbol names. This is the default. |
| 331 |
.IP \fB\-\-recurse\-limit\fR 4 |
| 332 |
.IX Item "--recurse-limit" |
| 333 |
.PD 0 |
| 334 |
.IP \fB\-\-no\-recurse\-limit\fR 4 |
| 335 |
.IX Item "--no-recurse-limit" |
| 336 |
.IP \fB\-\-recursion\-limit\fR 4 |
| 337 |
.IX Item "--recursion-limit" |
| 338 |
.IP \fB\-\-no\-recursion\-limit\fR 4 |
| 339 |
.IX Item "--no-recursion-limit" |
| 340 |
.PD |
| 341 |
Enables or disables a limit on the amount of recursion performed |
| 342 |
whilst demangling strings. Since the name mangling formats allow for |
| 343 |
an infinite level of recursion it is possible to create strings whose |
| 344 |
decoding will exhaust the amount of stack space available on the host |
| 345 |
machine, triggering a memory fault. The limit tries to prevent this |
| 346 |
from happening by restricting recursion to 2048 levels of nesting. |
| 347 |
.Sp |
| 348 |
The default is for this limit to be enabled, but disabling it may be |
| 349 |
necessary in order to demangle truly complicated names. Note however |
| 350 |
that if the recursion limit is disabled then stack exhaustion is |
| 351 |
possible and any bug reports about such an event will be rejected. |
| 352 |
.IP \fB\-D\fR 4 |
| 353 |
.IX Item "-D" |
| 354 |
.PD 0 |
| 355 |
.IP \fB\-\-dynamic\fR 4 |
| 356 |
.IX Item "--dynamic" |
| 357 |
.PD |
| 358 |
Display the dynamic symbols rather than the normal symbols. This is |
| 359 |
only meaningful for dynamic objects, such as certain types of shared |
| 360 |
libraries. |
| 361 |
.IP "\fB\-f\fR \fIformat\fR" 4 |
| 362 |
.IX Item "-f format" |
| 363 |
.PD 0 |
| 364 |
.IP \fB\-\-format=\fR\fIformat\fR 4 |
| 365 |
.IX Item "--format=format" |
| 366 |
.PD |
| 367 |
Use the output format \fIformat\fR, which can be \f(CW\*(C`bsd\*(C'\fR, |
| 368 |
\&\f(CW\*(C`sysv\*(C'\fR, \f(CW\*(C`posix\*(C'\fR or \f(CW\*(C`just\-symbols\*(C'\fR. The default is \f(CW\*(C`bsd\*(C'\fR. |
| 369 |
Only the first character of \fIformat\fR is significant; it can be |
| 370 |
either upper or lower case. |
| 371 |
.IP \fB\-g\fR 4 |
| 372 |
.IX Item "-g" |
| 373 |
.PD 0 |
| 374 |
.IP \fB\-\-extern\-only\fR 4 |
| 375 |
.IX Item "--extern-only" |
| 376 |
.PD |
| 377 |
Display only external symbols. |
| 378 |
.IP \fB\-h\fR 4 |
| 379 |
.IX Item "-h" |
| 380 |
.PD 0 |
| 381 |
.IP \fB\-\-help\fR 4 |
| 382 |
.IX Item "--help" |
| 383 |
.PD |
| 384 |
Show a summary of the options to \fBnm\fR and exit. |
| 385 |
.IP \fB\-\-ifunc\-chars=\fR\fICHARS\fR 4 |
| 386 |
.IX Item "--ifunc-chars=CHARS" |
| 387 |
When display GNU indirect function symbols \fBnm\fR will default |
| 388 |
to using the \f(CW\*(C`i\*(C'\fR character for both local indirect functions and |
| 389 |
global indirect functions. The \fB\-\-ifunc\-chars\fR option allows |
| 390 |
the user to specify a string containing one or two characters. The |
| 391 |
first character will be used for global indirect function symbols and |
| 392 |
the second character, if present, will be used for local indirect |
| 393 |
function symbols. |
| 394 |
.IP \fBj\fR 4 |
| 395 |
.IX Item "j" |
| 396 |
The same as \fB\-\-format=just\-symbols\fR. |
| 397 |
.IP \fB\-l\fR 4 |
| 398 |
.IX Item "-l" |
| 399 |
.PD 0 |
| 400 |
.IP \fB\-\-line\-numbers\fR 4 |
| 401 |
.IX Item "--line-numbers" |
| 402 |
.PD |
| 403 |
For each symbol, use debugging information to try to find a filename and |
| 404 |
line number. For a defined symbol, look for the line number of the |
| 405 |
address of the symbol. For an undefined symbol, look for the line |
| 406 |
number of a relocation entry which refers to the symbol. If line number |
| 407 |
information can be found, print it after the other symbol information. |
| 408 |
.IP \fB\-\-inlines\fR 4 |
| 409 |
.IX Item "--inlines" |
| 410 |
When option \fB\-l\fR is active, if the address belongs to a |
| 411 |
function that was inlined, then this option causes the source |
| 412 |
information for all enclosing scopes back to the first non-inlined |
| 413 |
function to be printed as well. For example, if \f(CW\*(C`main\*(C'\fR inlines |
| 414 |
\&\f(CW\*(C`callee1\*(C'\fR which inlines \f(CW\*(C`callee2\*(C'\fR, and address is from |
| 415 |
\&\f(CW\*(C`callee2\*(C'\fR, the source information for \f(CW\*(C`callee1\*(C'\fR and \f(CW\*(C`main\*(C'\fR |
| 416 |
will also be printed. |
| 417 |
.IP \fB\-n\fR 4 |
| 418 |
.IX Item "-n" |
| 419 |
.PD 0 |
| 420 |
.IP \fB\-v\fR 4 |
| 421 |
.IX Item "-v" |
| 422 |
.IP \fB\-\-numeric\-sort\fR 4 |
| 423 |
.IX Item "--numeric-sort" |
| 424 |
.PD |
| 425 |
Sort symbols numerically by their addresses, rather than alphabetically |
| 426 |
by their names. |
| 427 |
.IP \fB\-p\fR 4 |
| 428 |
.IX Item "-p" |
| 429 |
.PD 0 |
| 430 |
.IP \fB\-\-no\-sort\fR 4 |
| 431 |
.IX Item "--no-sort" |
| 432 |
.PD |
| 433 |
Do not bother to sort the symbols in any order; print them in the order |
| 434 |
encountered. |
| 435 |
.IP \fB\-P\fR 4 |
| 436 |
.IX Item "-P" |
| 437 |
.PD 0 |
| 438 |
.IP \fB\-\-portability\fR 4 |
| 439 |
.IX Item "--portability" |
| 440 |
.PD |
| 441 |
Use the POSIX.2 standard output format instead of the default format. |
| 442 |
Equivalent to \fB\-f posix\fR. |
| 443 |
.IP \fB\-r\fR 4 |
| 444 |
.IX Item "-r" |
| 445 |
.PD 0 |
| 446 |
.IP \fB\-\-reverse\-sort\fR 4 |
| 447 |
.IX Item "--reverse-sort" |
| 448 |
.PD |
| 449 |
Reverse the order of the sort (whether numeric or alphabetic); let the |
| 450 |
last come first. |
| 451 |
.IP \fB\-S\fR 4 |
| 452 |
.IX Item "-S" |
| 453 |
.PD 0 |
| 454 |
.IP \fB\-\-print\-size\fR 4 |
| 455 |
.IX Item "--print-size" |
| 456 |
.PD |
| 457 |
Print both value and size of defined symbols for the \f(CW\*(C`bsd\*(C'\fR output style. |
| 458 |
This option has no effect for object formats that do not record symbol |
| 459 |
sizes, unless \fB\-\-size\-sort\fR is also used in which case a |
| 460 |
calculated size is displayed. |
| 461 |
.IP \fB\-s\fR 4 |
| 462 |
.IX Item "-s" |
| 463 |
.PD 0 |
| 464 |
.IP \fB\-\-print\-armap\fR 4 |
| 465 |
.IX Item "--print-armap" |
| 466 |
.PD |
| 467 |
When listing symbols from archive members, include the index: a mapping |
| 468 |
(stored in the archive by \fBar\fR or \fBranlib\fR) of which modules |
| 469 |
contain definitions for which names. |
| 470 |
.IP "\fB\-t\fR \fIradix\fR" 4 |
| 471 |
.IX Item "-t radix" |
| 472 |
.PD 0 |
| 473 |
.IP \fB\-\-radix=\fR\fIradix\fR 4 |
| 474 |
.IX Item "--radix=radix" |
| 475 |
.PD |
| 476 |
Use \fIradix\fR as the radix for printing the symbol values. It must be |
| 477 |
\&\fBd\fR for decimal, \fBo\fR for octal, or \fBx\fR for hexadecimal. |
| 478 |
.IP \fB\-u\fR 4 |
| 479 |
.IX Item "-u" |
| 480 |
.PD 0 |
| 481 |
.IP \fB\-\-undefined\-only\fR 4 |
| 482 |
.IX Item "--undefined-only" |
| 483 |
.PD |
| 484 |
Display only undefined symbols (those external to each object file). |
| 485 |
By default both defined and undefined symbols are displayed. |
| 486 |
.IP \fB\-U\fR 4 |
| 487 |
.IX Item "-U" |
| 488 |
.PD 0 |
| 489 |
.IP \fB\-\-defined\-only\fR 4 |
| 490 |
.IX Item "--defined-only" |
| 491 |
.PD |
| 492 |
Display only defined symbols for each object file. |
| 493 |
By default both defined and undefined symbols are displayed. |
| 494 |
.IP \fB\-V\fR 4 |
| 495 |
.IX Item "-V" |
| 496 |
.PD 0 |
| 497 |
.IP \fB\-\-version\fR 4 |
| 498 |
.IX Item "--version" |
| 499 |
.PD |
| 500 |
Show the version number of \fBnm\fR and exit. |
| 501 |
.IP \fB\-X\fR 4 |
| 502 |
.IX Item "-X" |
| 503 |
This option is ignored for compatibility with the AIX version of |
| 504 |
\&\fBnm\fR. It takes one parameter which must be the string |
| 505 |
\&\fB32_64\fR. The default mode of AIX \fBnm\fR corresponds |
| 506 |
to \fB\-X 32\fR, which is not supported by GNU \fBnm\fR. |
| 507 |
.IP "\fB\-\-plugin\fR \fIname\fR" 4 |
| 508 |
.IX Item "--plugin name" |
| 509 |
Load the plugin called \fIname\fR to add support for extra target |
| 510 |
types. This option is only available if the toolchain has been built |
| 511 |
with plugin support enabled. |
| 512 |
.Sp |
| 513 |
If \fB\-\-plugin\fR is not provided, but plugin support has been |
| 514 |
enabled then \fBnm\fR iterates over the files in |
| 515 |
\&\fI${libdir}/bfd\-plugins\fR in alphabetic order and the first |
| 516 |
plugin that claims the object in question is used. |
| 517 |
.Sp |
| 518 |
Please note that this plugin search directory is \fInot\fR the one |
| 519 |
used by \fBld\fR's \fB\-plugin\fR option. In order to make |
| 520 |
\&\fBnm\fR use the linker plugin it must be copied into the |
| 521 |
\&\fI${libdir}/bfd\-plugins\fR directory. For GCC based compilations |
| 522 |
the linker plugin is called \fIliblto_plugin.so.0.0.0\fR. For Clang |
| 523 |
based compilations it is called \fILLVMgold.so\fR. The GCC plugin |
| 524 |
is always backwards compatible with earlier versions, so it is |
| 525 |
sufficient to just copy the newest one. |
| 526 |
.IP \fB\-\-size\-sort\fR 4 |
| 527 |
.IX Item "--size-sort" |
| 528 |
Sort symbols by size. For ELF objects symbol sizes are read from the |
| 529 |
ELF, for other object types the symbol sizes are computed as the |
| 530 |
difference between the value of the symbol and the value of the symbol |
| 531 |
with the next higher value. If the \f(CW\*(C`bsd\*(C'\fR output format is used |
| 532 |
the size of the symbol is printed, rather than the value, and |
| 533 |
\&\fB\-S\fR must be used in order both size and value to be printed. |
| 534 |
.Sp |
| 535 |
Note \- this option does not work if \fB\-\-undefined\-only\fR has been |
| 536 |
enabled as undefined symbols have no size. |
| 537 |
.IP \fB\-\-special\-syms\fR 4 |
| 538 |
.IX Item "--special-syms" |
| 539 |
Display symbols which have a target-specific special meaning. These |
| 540 |
symbols are usually used by the target for some special processing and |
| 541 |
are not normally helpful when included in the normal symbol lists. |
| 542 |
For example for ARM targets this option would skip the mapping symbols |
| 543 |
used to mark transitions between ARM code, THUMB code and data. |
| 544 |
.IP \fB\-\-synthetic\fR 4 |
| 545 |
.IX Item "--synthetic" |
| 546 |
Include synthetic symbols in the output. These are special symbols |
| 547 |
created by the linker for various purposes. They are not shown by |
| 548 |
default since they are not part of the binary's original source code. |
| 549 |
.IP \fB\-\-unicode=\fR\fI[default|invalid|locale|escape|hex|highlight]\fR 4 |
| 550 |
.IX Item "--unicode=[default|invalid|locale|escape|hex|highlight]" |
| 551 |
Controls the display of UTF\-8 encoded multibyte characters in strings. |
| 552 |
The default (\fB\-\-unicode=default\fR) is to give them no special |
| 553 |
treatment. The \fB\-\-unicode=locale\fR option displays the sequence |
| 554 |
in the current locale, which may or may not support them. The options |
| 555 |
\&\fB\-\-unicode=hex\fR and \fB\-\-unicode=invalid\fR display them as |
| 556 |
hex byte sequences enclosed by either angle brackets or curly braces. |
| 557 |
.Sp |
| 558 |
The \fB\-\-unicode=escape\fR option displays them as escape sequences |
| 559 |
(\fI\euxxxx\fR) and the \fB\-\-unicode=highlight\fR option displays |
| 560 |
them as escape sequences highlighted in red (if supported by the |
| 561 |
output device). The colouring is intended to draw attention to the |
| 562 |
presence of unicode sequences where they might not be expected. |
| 563 |
.IP \fB\-W\fR 4 |
| 564 |
.IX Item "-W" |
| 565 |
.PD 0 |
| 566 |
.IP \fB\-\-no\-weak\fR 4 |
| 567 |
.IX Item "--no-weak" |
| 568 |
.PD |
| 569 |
Do not display weak symbols. |
| 570 |
.IP \fB\-\-with\-symbol\-versions\fR 4 |
| 571 |
.IX Item "--with-symbol-versions" |
| 572 |
.PD 0 |
| 573 |
.IP \fB\-\-without\-symbol\-versions\fR 4 |
| 574 |
.IX Item "--without-symbol-versions" |
| 575 |
.PD |
| 576 |
Enables or disables the display of symbol version information. The |
| 577 |
version string is displayed as a suffix to the symbol name, preceded |
| 578 |
by an @ character. For example \fBfoo@VER_1\fR. If the version is |
| 579 |
the default version to be used when resolving unversioned references |
| 580 |
to the symbol then it is displayed as a suffix preceded by two @ |
| 581 |
characters. For example \fBfoo@@VER_2\fR. By default, symbol |
| 582 |
version information is displayed. |
| 583 |
.IP \fB\-\-target=\fR\fIbfdname\fR 4 |
| 584 |
.IX Item "--target=bfdname" |
| 585 |
Specify an object code format other than your system's default format. |
| 586 |
.IP \fB@\fR\fIfile\fR 4 |
| 587 |
.IX Item "@file" |
| 588 |
Read command-line options from \fIfile\fR. The options read are |
| 589 |
inserted in place of the original @\fIfile\fR option. If \fIfile\fR |
| 590 |
does not exist, or cannot be read, then the option will be treated |
| 591 |
literally, and not removed. |
| 592 |
.Sp |
| 593 |
Options in \fIfile\fR are separated by whitespace. A whitespace |
| 594 |
character may be included in an option by surrounding the entire |
| 595 |
option in either single or double quotes. Any character (including a |
| 596 |
backslash) may be included by prefixing the character to be included |
| 597 |
with a backslash. The \fIfile\fR may itself contain additional |
| 598 |
@\fIfile\fR options; any such options will be processed recursively. |
| 599 |
.SH "SEE ALSO" |
| 600 |
.IX Header "SEE ALSO" |
| 601 |
\&\fBar\fR\|(1), \fBobjdump\fR\|(1), \fBranlib\fR\|(1), and the Info entries for \fIbinutils\fR. |
| 602 |
.SH COPYRIGHT |
| 603 |
.IX Header "COPYRIGHT" |
| 604 |
Copyright (c) 1991\-2026 Free Software Foundation, Inc. |
| 605 |
.PP |
| 606 |
Permission is granted to copy, distribute and/or modify this document |
| 607 |
under the terms of the GNU Free Documentation License, Version 1.3 |
| 608 |
or any later version published by the Free Software Foundation; |
| 609 |
with no Invariant Sections, with no Front-Cover Texts, and with no |
| 610 |
Back-Cover Texts. A copy of the license is included in the |
| 611 |
section entitled "GNU Free Documentation License". |