Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

nm(1) [ultrix man page]

nm(1)							      General Commands Manual							     nm(1)

Name
       nm - name list dump of RISC object files

Syntax
       nm [-adefghnopruvxABTV] [ file1 ... filen ]

Description
       The  nm	command  prints listings formats for the symbol and external sections of the symbol table.  A file can be an object or an archive.
       If you do not specify a file, this command assumes a.out.

Options
       The -A and -B options specify AT&T System V style output or Berkeley (4.3  BSD) style output, respectively.  The default is  Berkeley  (4.3
       BSD).  Some options can change the version-specific defaults. These options change the meaning of overloaded flags after -A or -B is speci-
       fied.

       A normal Berkeley system produces the address or value field followed by a letter showing what section the symbol or external is in and the
       name of the symbol or external.

       These section letters describe the information that nm generates:

       N    nil storage class, compiler internal usage

       T    external text

       t    local text

       D    external initialized data

       d    local initialized data

       B    external zeroed data

       b    local zeroed data

       A    external absolute

       a    local absolute

       U    external undefined

       G    external small initialized data

       g    local small initialized data

       S    external small zeroed data

       s    local small zeroed data

       R    external read only

       r    local read only

       C    common

       E    small common

       V    external small undefined

       The standard  System V format and the -a specified Berkeley format provide an expanded listing with these columns:

       Name    the symbol or external name

       Value   the value field for the symbol or external, usually an address or interesting debugging information

       Class   the symbol type

       Type    the symbol's language declaration

       Size    unused

       Index   the symbol's index field

       Section the  symbol's  storage  class  Every  effort  was made to map the field's functionality into System V nomenclature.  The nm command
	       accepts these options:

       -a   prints debugging information, effectively turning Berkeley into System V format

       -b   prints the value field in octal

       -d   prints the value field in decimal (the System V default)

       -e   prints external and statics only

       -f   produces full output--nm still accepts this old option, but ignores it

       -h   does not print headers

       -n   for System V, sorts external symbols by name (default for Berkeley), and for Berkeley, sorts all symbols by value

       -o   for System V, prints the value field in octal, and for Berkeley prepends the filename to each symbol--good for grepping through nm	of
	    libraries

       -p   prints symbols as they are found in the file (the System V default)

       -r   reverses the sense of a value or name sort

       -u   prints only undefined symbols

       -v   sorts external symbols by value

       -x   prints value field in hexadecimal (Berkeley default)

       -T   truncates long names, inserting an asterisk (*) as the last printed character

       -V   prints version information on stderr

								       RISC								     nm(1)

Check Out this Related Man Page

nm(1)							      General Commands Manual							     nm(1)

NAME
nm - print name list of common object file SYNOPSIS
format] file ... DESCRIPTION
The command displays the symbol table of each object file, file. There are three general output formats: the default (neither nor specified), specified, and specified. The output formats are described after the "Options" subsection. By default, prints the entire name of the symbols listed. Since object files can have symbol names with an arbitrary number of characters, a name that is longer than the width of the column set aside for names will overflow its column, forcing every column after the name to be misaligned. Options recognizes the following options: Prefix each output line with the name of the object file or archive, file. Equivalent to Demangle C++ names before printing them (ELF only). Display the value and size of a symbol in decimal. This is the default for the default format or the format. Equivalent to Display only and symbols. This option is ignored (see Display full output. This option is in force by default. Display only (global) symbol information. Do not display the output header data. Distinguish between weak and global symbols by appending * to the key letter of weak symbols. Only takes effect with and/or Sort symbols by name, in ascending collation order, before they are printed. This is the default. See in below. Display symbols in the order in which they appear in the symbol table. Display the value and size of a symbol in octal. Equivalent to Display information in a blank-separated output format. Each symbol name is preceded by its value (blanks if undefined) and a letter to indicate type. A lowercase letter indi- cates a local (nonexternal) symbol. (absolute) (bss symbol) (common symbol) (data symbol) (milli symbol) ELF only (notype) ELF only (section region) (tstorage symbol) SOM only (text symbol) (undefined) If the symbol is a secondary definition, the type letter is followed by the letter Note that is not compatible with Display information in a portable output format, as specified below, to standard output. Note that is not compatible with Prefix each output line with the name of the object file or archive, file. Equivalent to (SOM only) Silence some warning messages. Print the section index instead of the section name (ELF only). Display each numeric value in the specified format. format can be one of: Display the value and size of a symbol in decimal. This is the default for the default format or the format. Equivalent to Display the value and size of a symbol in octal. Equivalent to Display the value and size of a symbol in hexadecimal. This is the default for the format. Equivalent to (SOM only) Truncate every name that would otherwise overflow its column and place an asterisk as the last character in the displayed name to mark it as truncated. If or is also specified, the file prefix is truncated first. Display undefined symbols only. Print the usage menu. Sort symbols by value before they are printed. Display the executing version of the command on standard error. Display the value and size of a symbol in hexadecimal. This is the default for the format. Equivalent to Operands recognizes the following operand: file A relocatable object file or an executable object file, or an archive of relocatable or executable object files. Default Output Format - SOM If the default (neither the nor the option) output format is specified, each symbol has the following columns, separated by vertical bars The default for numbers is decimal or If decimal: If octal: If hexadecimal: Default Output Format - ELF If the default (neither the nor the option) output format is specified, each symbol has the following columns, separated by vertical bars The default for numbers is decimal or If decimal: If octal: If hexadecimal: The descriptions are explained below: name The name of the symbol. value Its value expressed as an offset or an address depending on its storage class. scope The scope of the symbol or The scope indicates an external symbol that is flagged as a secondary definition. type The type of the symbol subspace The subspace to which the symbol belongs. bind Specifies the symbol binding type (local, weak, global). O This field is used for files that have large section tables (>65K sections). For smaller files, the value of this field is 0. Shndx Identifies the index of the section that the symbol belongs to. Identifies the index of the symbol in the symbol table. Output Format for -p If the option is specified, information is displayed using the following portable C-language formats. The default for numbers is decimal or If decimal: If octal: If hexadecimal: If or the line is preceded by: Output Format for -P If the option is specified, information is displayed using the following portable C-language formats. The default for numbers is hexadeci- mal or In the format string, represents string output; represents decimal output; represents octal output; represents hexadecimal output; represents newline; all other characters represent themselves. o If decimal is specified: o If octal is specified: o If hexadecimal is specified, or by default: where library-object is a string preformatted as follows: o If and are not specified, library-object is an empty string. o If or is specified, and the corresponding file operand does not name a library: o If or is specified and the corresponding file operand names a library, object-file names the object file in the library containing the symbol being described: If and are not specified, and if more than one file operand is specified, or if a single file operand that names a library is specified, then prints a line identifying the object containing the symbols before the lines containing those symbols, in one of the following forms: o If the corresponding file operand does not name a library: o If the corresponding file operand names a library, object-file names the object file in the library containing the symbol being described: EXTERNAL INFLUENCES
Environment Variables The following internationalization variables affect the execution of determines the locale category for native language, local customs and coded character set in the absence of or other environment variables. If is not specified or is null, it defaults to (see lang(5)). if set to a nonempty string value, determines the values for all locale categories and has precedence over and other environment variables. determines the locale category for character collation. determines the locale category for character handling functions. determines the locale that should be used to affect the format and contents of diagnostic messages written to standard error. determines the locale category for numeric formatting. and determine the location of message catalogues for processing If an internationalization variable is not specified or is null, it defaults to the value of If is not specified or is null, it defaults to (see lang(5)). If any internationalization variable contains an invalid setting, then all internationalization variables default to (see environ(5)). International Code Set Support Single-byte character code sets are supported. EXAMPLES
Display which object files have undefined references for the symbol Display which object files have a definition for the text symbol leap: WARNINGS
By default, now sorts symbols by name (the option). To turn off sorting, use the option. Some options added for standards conformance duplicate the functionality of options that previously existed. This duplication has been retained for backward compatibility. SEE ALSO
System Tools cc_bundled(1) HP-UX C compiler ld(1) Link editor Miscellaneous crt0(3) Execution startup routine end(3C) Symbol of the last locations in program STANDARDS CONFORMANCE
nm(1)
Man Page