Hallo, dies ist ein Test.
PWD: /www/data-lst1/unixsoft/unixsoft/kaempfer/.public_html
Running in File Mode
Relative path: ./../../.././../../../usr/man/man1/nm.1
Real path: /usr/share/man/man1/nm.1
Zurück
'\" te .\" Copyright (c) 1989, AT&T. All rights reserved. .\" Copyright (c) 2007, 2021, Oracle and/or its affiliates. .\" Portions Copyright (c) 1992, The X/Open Company Ltd. All rights reserved. .\" Oracle gratefully acknowledges The Open Group for permission to reproduce portions of its copyrighted documentation. Original documentation from The Open Group can be obtained online at http://www.opengroup.org/bookstore/. .\" The Institute of Electrical and Electronics Engineers and The Open Group, have given us permission to reprint portions of their documentation. In the following statement, the phrase "this text" refers to portions of the system documentation. Portions of this text are reprinted and reproduced in electronic form in the Sun OS Reference Manual, from IEEE Std 1003.1, 2004 Edition, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 6, Copyright (C) 2001-2004 by the Institute of Electrical and Electronics Engineers, Inc and The Open Group. In the event of any discrepancy between these versions and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. The original Standard can be obtained online at http://www.opengroup.org/unix/online.html. This notice shall appear on any product containing this material. .TH nm 1 "11 May 2021" "Oracle Solaris 11.4" "User Commands" .SH NAME nm \- print name list of an object file .SH SYNOPSIS .LP .nf \fB/usr/bin/nm\fR [\fB-ACDhlLnpPrRsTvV\fR] [\fB-efox\fR] [\fB-g\fR | \fB-u\fR] [\fB-t\fR \fIformat\fR] \fIfile\fR... .fi .LP .nf \fB/usr/xpg4/bin/nm\fR [\fB-ACDhlLnpPrRsTvV\fR] [\fB-efox\fR] [\fB-g\fR | \fB-u\fR] [\fB-t\fR \fIformat\fR] \fIfile\fR... .fi .SH DESCRIPTION .sp .LP The \fBnm\fR utility displays the symbol table of each \fBELF\fR object file that is specified by \fIfile\fR. .sp .LP If no symbolic information is available for a valid input file, the \fBnm\fR utility reports that fact, but does not consider it an error condition. .SH OPTIONS .sp .LP The output of \fBnm\fR can be controlled using the following options: .sp .ne 2 .mk .na \fB\fB-A\fR\fR .ad .RS 13n .rt Writes the full path name or library name of an object on each line. .RE .sp .ne 2 .mk .na \fB\fB-C\fR\fR .ad .RS 13n .rt Demangles C++ symbol names before printing them out. .RE .sp .ne 2 .mk .na \fB\fB-D\fR\fR .ad .RS 13n .rt Displays the \fBSHT_DYNSYM\fR symbol information. This is the symbol table used by \fBld.so.1\fR and is present even in stripped dynamic executables. If \fB-D\fR is not specified, the default behavior is to display the \fBSHT_SYMTAB\fR symbol information. .RE .sp .ne 2 .mk .na \fB\fB-e\fR\fR .ad .RS 13n .rt See NOTES below. .RE .sp .ne 2 .mk .na \fB\fB-f\fR\fR .ad .RS 13n .rt See NOTES below. .RE .sp .ne 2 .mk .na \fB\fB-g\fR\fR .ad .RS 13n .rt Writes only external (global) symbol information. .RE .sp .ne 2 .mk .na \fB\fB-h\fR\fR .ad .RS 13n .rt Does not display the output heading data. .RE .sp .ne 2 .mk .na \fB\fB-L\fR\fR .ad .RS 13n .rt Displays the \fBSHT_SUNW_LDYNSYM\fR symbol information. This symbol table contains local function symbols. \fBSHT_SUNW_LDYNSM\fR symbol tables are present even in stripped dynamic executables. These symbols augment the global symbols that are found in \fBSHT_DYNSYM\fR symbol table. If \fB-L\fR is not specified, the default behavior is to display the \fBSHT_SYMTAB\fR symbol information. .RE .sp .ne 2 .mk .na \fB\fB-l\fR\fR .ad .RS 13n .rt When used with the \fB-p\fR or \fB-P\fR options, distinguishes between \fBWEAK\fR and \fBGLOBAL\fR symbols by appending a * to the key letter for \fBWEAK\fR symbols. .RE .sp .ne 2 .mk .na \fB\fB-n\fR\fR .ad .RS 13n .rt Sorts external symbols by name before they are printed. .RE .sp .ne 2 .mk .na \fB\fB-o\fR\fR .ad .RS 13n .rt Prints the value and size of a symbol in octal instead of decimal (equivalent to \fB-t\fR \fBo\fR). .RE .sp .ne 2 .mk .na \fB\fB-p\fR\fR .ad .RS 13n .rt Produces easy to parse, terse output. Each symbol name is preceded by its value (blanks if undefined) and one of the letters: .sp .sp .ne 2 .mk .na \fB\fBA\fR\fR .ad .RS 5n .rt Absolute symbol. .RE .sp .ne 2 .mk .na \fB\fBB\fR\fR .ad .RS 5n .rt bss (uninitialized data space) symbol. .RE .sp .ne 2 .mk .na \fB\fBC\fR\fR .ad .RS 5n .rt COMMON symbol. .RE .sp .ne 2 .mk .na \fB\fBD\fR\fR .ad .RS 5n .rt Data object symbol. .RE .sp .ne 2 .mk .na \fB\fBF\fR\fR .ad .RS 5n .rt File symbol. .RE .sp .ne 2 .mk .na \fB\fBN\fR\fR .ad .RS 5n .rt Symbol has no type. .RE .sp .ne 2 .mk .na \fB\fBL\fR\fR .ad .RS 5n .rt Thread-Local storage symbol. .RE .sp .ne 2 .mk .na \fB\fBR\fR\fR .ad .RS 5n .rt Register symbol. .RE .sp .ne 2 .mk .na \fB\fBS\fR\fR .ad .RS 5n .rt Section symbol. .RE .sp .ne 2 .mk .na \fB\fBT\fR\fR .ad .RS 5n .rt Text symbol. .RE .sp .ne 2 .mk .na \fB\fBU\fR\fR .ad .RS 5n .rt Undefined. .RE If the symbol's binding attribute is: .sp .ne 2 .mk .na \fB\fBLOCAL\fR\fR .ad .RS 10n .rt The key letter is lowercase. .RE .sp .ne 2 .mk .na \fB\fBWEAK\fR\fR .ad .RS 10n .rt The key letter is uppercase. If the \fB-l\fR modifier is specified, the uppercase key letter is followed by a \fB*\fR .RE .sp .ne 2 .mk .na \fB\fBGLOBAL\fR\fR .ad .RS 10n .rt The key letter is uppercase. .RE .RE .sp .ne 2 .mk .na \fB\fB-P\fR\fR .ad .RS 13n .rt Writes information in a portable output format, as specified in \fBStandard Output\fR. .RE .sp .ne 2 .mk .na \fB\fB-r\fR\fR .ad .RS 13n .rt Prepends the name of the object file or archive member to each symbol name, formatted as \fIobject\fR\fB:\fR\fIsymbol\fR. .RE .sp .ne 2 .mk .na \fB\fB-R\fR\fR .ad .RS 13n .rt When processing archives, prepends the archive and archive member names to each symbol name, formatted as \fIarchive\fR\fB:\fR\fImember\fR\fB:\fR\fIsymbol\fR. When processing non-archives, the \fB-R\fR option is equivalent to \fB-r\fR. If the \fB-r\fR option is also specified, this option is ignored. .RE .sp .ne 2 .mk .na \fB\fB-s\fR\fR .ad .RS 13n .rt Prints section name instead of section index. .RE .sp .ne 2 .mk .na \fB\fB-t\fR \fIformat\fR\fR .ad .RS 13n .rt Writes each numeric value in the specified format. The format is dependent on the single character used as the \fIformat\fR option-argument: .sp .ne 2 .mk .na \fB\fBd\fR\fR .ad .RS 5n .rt The offset is written in decimal (default). .RE .sp .ne 2 .mk .na \fB\fBo\fR\fR .ad .RS 5n .rt The offset is written in octal. .RE .sp .ne 2 .mk .na \fB\fBx\fR\fR .ad .RS 5n .rt The offset is written in hexadecimal. .RE .RE .sp .ne 2 .mk .na \fB\fB-T\fR\fR .ad .RS 13n .rt See \fBNOTES\fR. .RE .sp .ne 2 .mk .na \fB\fB-v\fR\fR .ad .RS 13n .rt Sorts external symbols by value before they are printed. .RE .sp .ne 2 .mk .na \fB\fB-V\fR\fR .ad .br .na \fB\fB--version\fR\fR .ad .RS 13n .rt Print version information. .RE .sp .ne 2 .mk .na \fB\fB-x\fR\fR .ad .RS 13n .rt Prints the value and size of a symbol in hexadecimal instead of decimal (equivalent to \fB-t\fR \fBx\fR). .RE .sp .ne 2 .mk .na \fB\fB-?\fR\fR .ad .br .na \fB\fB--help\fR\fR .ad .RS 13n .rt Print usage message and immediately exit. .RE .SS "/usr/bin/nm" .sp .ne 2 .mk .na \fB\fB-u\fR\fR .ad .RS 6n .rt Prints undefined symbols only. If this option is specified, the \fB-p\fR and \fB-P\fR options are ignored. .RE .SS "/usr/xpg4/bin/nm" .sp .ne 2 .mk .na \fB\fB-u\fR\fR .ad .RS 6n .rt Prints long listing for each undefined symbol. See \fBOUTPUT\fR below. .RE .sp .LP Options can be used in any order, either singly or in combination. When conflicting options are specified (such as \fB-v\fR and \fB-n\fR, or \fB-o\fR and \fB-x\fR) the first is taken and the second ignored with a warning message to the user. See \fB-R\fR and the \fB/usr/bin/nm\fR form of \fB-u\fR for exceptions. .SH OPERANDS .sp .LP The following operand is supported: .sp .ne 2 .mk .na \fB\fIfile\fR\fR .ad .RS 8n .rt A path name of an object file, executable file or object-file library. .RE .SH OUTPUT .sp .LP This section describes the \fBnm\fR utility's output options. .SS "Standard Output" .sp .LP For each symbol, the following information is printed: .sp .ne 2 .mk .na \fB\fBIndex\fR\fR .ad .RS 15n .rt The index of the symbol. (The index appears in brackets.) .RE .sp .ne 2 .mk .na \fB\fBValue\fR\fR .ad .RS 15n .rt The value of the symbol is one of the following: .RS +4 .TP .ie t \(bu .el o A section offset for defined symbols in a relocatable file. .RE .RS +4 .TP .ie t \(bu .el o Alignment constraints for symbols whose section index is \fBSHN_COMMON\fR. .RE .RS +4 .TP .ie t \(bu .el o A virtual address in executable and dynamic library files. .RE .RE .sp .ne 2 .mk .na \fB\fBSize\fR\fR .ad .RS 15n .rt The size in bytes of the associated object. .RE .sp .ne 2 .mk .na \fB\fBType\fR\fR .ad .RS 15n .rt A symbol is of one of the following types: .sp .ne 2 .mk .na \fB\fBNOTYPE\fR\fR .ad .RS 11n .rt No type was specified. .RE .sp .ne 2 .mk .na \fB\fBOBJECT\fR\fR .ad .RS 11n .rt A data object such as an array or variable. .RE .sp .ne 2 .mk .na \fB\fBFUNC\fR\fR .ad .RS 11n .rt A function or other executable code. .RE .sp .ne 2 .mk .na \fB\fBREGI\fR\fR .ad .RS 11n .rt A register symbol (\fBSPARC\fR only). .RE .sp .ne 2 .mk .na \fB\fBSECTION\fR\fR .ad .RS 11n .rt A section symbol. .RE .sp .ne 2 .mk .na \fB\fBFILE\fR\fR .ad .RS 11n .rt Name of the source file. .RE .sp .ne 2 .mk .na \fB\fBCOMMON\fR\fR .ad .RS 11n .rt An uninitialized common block. .RE .sp .ne 2 .mk .na \fB\fBTLS\fR\fR .ad .RS 11n .rt A variable associated with Thread-Local storage. .RE .RE .sp .ne 2 .mk .na \fB\fBBind\fR\fR .ad .RS 15n .rt The symbol's binding attributes. .sp .ne 2 .mk .na \fB\fBLOCAL symbols\fR\fR .ad .RS 18n .rt Have a scope limited to the object file containing their definition. .RE .sp .ne 2 .mk .na \fB\fBGLOBAL symbols\fR\fR .ad .RS 18n .rt Are visible to all object files being combined. .RE .sp .ne 2 .mk .na \fB\fBWEAK symbols\fR\fR .ad .RS 18n .rt Are essentially global symbols with a lower precedence than \fBGLOBAL\fR. .RE .RE .sp .ne 2 .mk .na \fB\fBOther\fR\fR .ad .RS 15n .rt An integer corresponding to one of the \fBSTV_\fR symbol visibility values defined in \fB<sys/elf.h>\fR. .RE .sp .ne 2 .mk .na \fB\fBShndx\fR\fR .ad .RS 15n .rt Except for three special values, this is the section header table index in relation to which the symbol is defined. The following special values exist: .sp .ne 2 .mk .na \fB\fBABS\fR\fR .ad .RS 10n .rt Indicates the symbol's value does not change through relocation. .RE .sp .ne 2 .mk .na \fB\fBCOMMON\fR\fR .ad .RS 10n .rt Indicates an unallocated block and the value provides alignment constraints. .RE .sp .ne 2 .mk .na \fB\fBUNDEF\fR\fR .ad .RS 10n .rt Indicates an undefined symbol. .RE .RE .sp .ne 2 .mk .na \fB\fBName\fR\fR .ad .RS 15n .rt The name of the symbol. .RE .sp .ne 2 .mk .na \fB\fBObject Name\fR\fR .ad .RS 15n .rt The name of the object or library if \fB-A\fR is specified. .RE .sp .LP If the \fB-P\fR option is specified, the previous information is displayed using the following portable format. The three versions differ depending on whether \fB-t\fR \fBd\fR, \fB-t\fR \fBo\fR, or \fB-t\fR \fBx\fR was specified, respectively: .sp .in +2 .nf \fB"%s%s %s %d %d\en",\fR \fIlibrary/object name\fR, \fIname\fR, \fItype\fR, \fIvalue\fR, \fIsize\fR .fi .in -2 .sp .sp .in +2 .nf \fB"%s%s %s %o %o\en",\fR \fIlibrary/object name\fR, \fIname\fR, \fItype\fR, \fIvalue\fR, \fIsize\fR .fi .in -2 .sp .sp .in +2 .nf \fB"%s%s %s %x %x\en",\fR \fIlibrary/object name\fR, \fIname\fR, \fItype\fR, \fIvalue\fR, \fIsize\fR .fi .in -2 .sp .sp .LP where \fItype\fR is formatted as described for the \fB-p\fR option, and \fIlibrary/object name\fR is formatted as follows: .RS +4 .TP .ie t \(bu .el o If \fB-A\fR is not specified, \fIlibrary/object name\fR is an empty string. .RE .RS +4 .TP .ie t \(bu .el o If \fB-A\fR is specified and the corresponding \fIfile\fR operand does not name a library: .sp .in +2 .nf \fB"%s: ", \fIfile\fR\fR .fi .in -2 .sp .RE .RS +4 .TP .ie t \(bu .el o If \fB-A\fR is specified and the corresponding \fIfile\fR operand names a library. In this case, \fIobject file\fR names the object file in the library containing the symbol being described: .sp .in +2 .nf \fB"%s[%s]: ", \fIfile\fR, \fIobject file\fR\fR .fi .in -2 .sp .RE .sp .LP If \fB-A\fR is not specified, then if more than one \fIfile\fR operand is specified or if only one \fIfile\fR operand is specified and it names a library, \fBnm\fR writes a line identifying the object containing the following symbols before the lines containing those symbols, in the form: .RS +4 .TP .ie t \(bu .el o If the corresponding \fIfile\fR operand does not name a library: .sp .in +2 .nf \fB"%s:\en", \fIfile\fR\fR .fi .in -2 .sp .RE .RS +4 .TP .ie t \(bu .el o If the corresponding \fIfile\fR operand names a library; in this case, \fIobject file\fR is the name of the file in the library containing the following symbols: .sp .in +2 .nf \fB"%s[%s]:\en", \fIfile\fR, \fIobject file\fR\fR .fi .in -2 .sp .RE .sp .LP If \fB-P\fR is specified, but \fB-t\fR is not, the format is as if \fB-t\fR \fBx\fR had been specified. .SH ENVIRONMENT VARIABLES .sp .LP See \fBenviron\fR(7) for descriptions of the following environment variables that affect the execution of \fBnm\fR: \fBLANG\fR, \fBLC_ALL\fR, \fBLC_COLLATE\fR, \fBLC_CTYPE\fR, \fBLC_MESSAGES\fR, and \fBNLSPATH\fR. .SH EXIT STATUS .sp .LP The following exit values are returned: .sp .ne 2 .mk .na \fB\fB0\fR\fR .ad .RS 6n .rt Successful completion. .RE .sp .ne 2 .mk .na \fB\fB>0\fR\fR .ad .RS 6n .rt An error occurred. .RE .SH ATTRIBUTES .sp .LP See \fBattributes\fR(7) for descriptions of the following attributes: .SS "/usr/bin/nm" .sp .TS tab( ) box; cw(2.75i) |cw(2.75i) lw(2.75i) |lw(2.75i) . ATTRIBUTE TYPE ATTRIBUTE VALUE _ Availability developer/base-developer-utilities .TE .sp .SS "/usr/xpg4/bin/nm" .sp .TS tab( ) box; cw(2.75i) |cw(2.75i) lw(2.75i) |lw(2.75i) . ATTRIBUTE TYPE ATTRIBUTE VALUE _ Availability system/xopen/xcu4 _ Interface Stability Committed .TE .sp .SH SEE ALSO .sp .LP \fBar\fR(1), \fBas\fR(1), \fBdump\fR(1), \fBld\fR(1), \fBld.so.1\fR(1), \fBar.h\fR(3HEAD), \fBa.out\fR(5), \fBattributes\fR(7), \fBenviron\fR(7), \fBstandards\fR(7) .SH NOTES .sp .LP The following options are obsolete because of changes to the object file format and might be deleted in a future release. .sp .ne 2 .mk .na \fB\fB-e\fR\fR .ad .RS 6n .rt Prints only external and static symbols. The symbol table now contains only static and external symbols. Automatic symbols no longer appear in the symbol table. They do appear in the debugging information produced by \fBcc\fR \fB-g\fR, which can be examined using \fBdump\fR(1). .RE .sp .ne 2 .mk .na \fB\fB-f\fR\fR .ad .RS 6n .rt Produces full output. Redundant symbols (such as \fB.text\fR, \fB.data\fR, and so forth), which existed previously, do not exist and producing full output is identical to the default output. .RE .sp .ne 2 .mk .na \fB\fB-T\fR\fR .ad .RS 6n .rt By default, \fBnm\fR prints the entire name of the symbols listed. Since symbol names have been moved to the last column, the problem of overflow is removed and it is no longer necessary to truncate the symbol name. .RE