Nm(1): Symbols From Item Files


nm – listing SYMBOL symbols from item files


nm [-ahandiest][–plugin name–demangle[=style–print-length-ofile-name][–special-syms] [-ntype–no-kind–reverse-kind] [–size-sort] [-umost effective] [-t radixgoal=bfdname] [-fformat–format=format] [–defined-simplest]

[-lmodel] [-X 32_64] [–assist] [objfile…]


GNU nm lists the symbols from item documents objfile…. If no item documents are listed as arguments, nm SYMBOL assumes the record


For every image, nm shows:

• The symbol value, within the radix decided on by means of alternatives (see underneath), or hexadecimal by default.

• The symbol kind. At least the following kinds are used; others are, as nicely, depending on the object document format. If lowercase, the image is neighborhood; if

uppercase, the symbol is worldwide (external).


The symbol’s cost is absolute, and could no longer be modified by further linking.



The image is in the uninitialized records phase (known as BSS ).


The image is not unusual. Common symbols are uninitialized records. When linking, a couple of commonplace symbols may seem with the identical name. If the symbol is described

everywhere, the not unusual symbols are treated as undefined references.



The image is inside the initialized information phase.



The image is in an initialized statistics phase for small gadgets. Some object document formats allow more green get admission to to small data gadgets, consisting of a

international int variable as opposed to a big international array.


For PE layout files this suggests that the symbol is in a phase precise to the implementation of DLLs. For ELF layout

files this indicates that the symbol is an indirect characteristic. This is a GNU extension to the same old set of ELF image sorts. It

indicates a symbol which if referenced by way of a relocation does not evaluate to its address, however alternatively must be invoked at runtime. The runtime execution will

then go back the cost for use within the relocation.


The image is a debugging image.


The symbols is in a stack unwind phase.



The image is in a study simplest facts segment.



The image is in an uninitialized records phase for small objects.



The image is within the text (code) section.


The symbol is undefined.


The image is a completely unique international image. This is a GNU extension to the same old set of ELF image bindings. For the sort of symbol

the dynamic linker will make certain that within the whole technique there may be just one symbol with this name and sort in use.



The symbol is a weak item. When a susceptible defined symbol is linked with a regular defined symbol, the regular described symbol is used and not using a error. When a susceptible

undefined image is linked and the image isn’t described, the value of the vulnerable image turns into zero without a errors. On a few structures, uppercase indicates that a

default cost has been distinct.



The symbol is a weak symbol that has now not been specially tagged as a weak object symbol. When a susceptible described image is related with a regular defined

image, the normal described image is used and not using a mistakes. When a vulnerable undefined symbol is connected and the image isn’t described, the cost of the symbol is

decided in a gadget-unique way with out errors. On some structures, uppercase suggests that a default cost has been certain.


The image is a stabs image in an a.out item record. In this situation, the subsequent values printed are the stabs different discipline, the stabs desc discipline, and the stab

type. Stabs symbols are used to keep debugging facts.


The image type is unknown, or object document format specific.

• The symbol call.


The long and quick types of options, shown here as alternatives, are equivalent.




Precede every symbol through the name of the enter document (or SYMBOL archive member) wherein it become determined, as opposed to figuring out the input document once only, before all of

its symbols.



Display all symbols, even debugger-simplest symbols; typically those are not listed.


The equal as –format=bsd (for compatibility with the MIPS nm).



Decode (demangle) low-stage image names into user-degree names. Besides eliminating any preliminary underscore prepended via the machine, this makes C

++ feature names readable. Different compilers have one-of-a-kind mangling styles. The non-compulsory demangling fashion argument can be used to pick out an

suitable demangling style on your compiler.


Do now not demangle low-degree symbol names. This is the default.



Display the dynamic symbols in preference to the everyday symbols. This is only significant for dynamic items, which include certain styles of shared libraries.

-f layout


Use the output format format, which may be “bsd”, “sysv”, or “posix”. The default is “bsd”. Only the primary

man or woman of format is tremendous; it could be either top or lower case.



Display most effective external symbols.

–plugin call

Load the plugin known as name to add assist for extra goal types. This choice is simplest available if the toolchain has been constructed with plugin help




For every image, use debugging facts to try to discover a filename and line variety. For a defined image, look for the road wide variety of the deal with of the

image. For an undefined image, search for the road variety of a relocation entry which refers back to the image. If line number records may be determined, print it

after the opposite image data.




Sort symbols numerically by using their addresses, as opposed to alphabetically with the aid of their names.



Do now not trouble to sort the symbols in any order; print them inside the order encountered.



Use the POSIX .2 fashionable output format in place of the default layout. Equivalent to -f posix.



Print both value and size of described symbols for the “bsd” output style. This alternative has no effect for object codecs that do not file image

sizes, except –size-type is likewise used wherein case a calculated size is displayed.



When list symbols from archive contributors, include the index: a mapping (stored inside the archive through ar or ranlib) of which modules include

definitions for which names.



Reverse the order of the type (whether numeric or alphabetic); allow the final come first.


Sort symbols via size. The size is computed because the difference among the cost of the symbol and the price of the symbol with the next higher value. If the

“bsd” output layout is used the size of the image is outlined, in preference to the fee, and -S ought to be used in order each size and price to be



Display symbols that have a goal-precise unique that means. These symbols are generally used by the target for a few special processing and are not usually

useful whilst protected blanketed inside the regular symbol lists. For instance for ARM goals this option might skip the mapping symbols used to mark

transitions between ARM code, THUMB code and records.

-t radix


Use radix because the radix for printing the image values. It must be d for decimal, o for octal, or x for hexadecimal.


Specify an object code layout apart from your machine’s default format.



Display simplest undefined symbols (those outside to every item record).


Display most effective described symbols for each object document.



Show the model range of nm and go out.


This option is neglected for compatibility with the AIX version of nm. It takes one parameter which have to be the string 32_64. The

default mode of AIX nm corresponds to -X 32, which isn’t supported by way of GNU nm.


Show a summary of the options to nm and exit.


Read command-line options from file. The alternatives examine are inserted in area of the unique @document option. If record does now not exist, or

cannot be read, then the option might be dealt with actually, and now not removed.

Options in file are separated by means of whitespace. A whitespace man or woman may be blanketed in an option by means of surrounding the whole choice in both unmarried or

double prices. Any character (which includes a backslash) can be included with the aid of prefixing the man or woman to be blanketed with a backslash. The file might also itself

include additional @document options; such a options can be processed recursively.

See Also

ar(1), objdump(1), ranlib(1), and the Info entries for binutils.


Copyright © 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,


Permission is granted to copy, distribute and/or modify this record underneath the phrases of the GNU Free Documentation License, Version 1.3 or

any later version posted with the aid of the Free Software Foundation; with no Invariant Sections, without a Front-Cover Texts, and and not using a Back-Cover Texts. A replica of the

license is included within the segment entitled ” GNU Free Documentation License”.

Referenced By













Leave a Reply

Your email address will not be published. Required fields are marked *