📄 nm.html
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html><head><meta name="generator" content="HTML Tidy, see www.w3.org"><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"><link type="text/css" rel="stylesheet" href="style.css"><!-- Generated by The Open Group's rhtm tool v1.2.1 --><!-- Copyright (c) 2001-2003 The Open Group, All Rights Reserved --><title>nm</title></head><body bgcolor="white"><script type="text/javascript" language="JavaScript" src="../jscript/codes.js"></script><basefont size="3"> <a name="nm"></a> <a name="tag_04_94"></a><!-- nm --> <!--header start--><center><font size="2">The Open Group Base Specifications Issue 6<br>IEEE Std 1003.1, 2003 Edition<br>Copyright © 2001-2003 The IEEE and The Open Group, All Rights reserved.</font></center><!--header end--><hr size="2" noshade><h4><a name="tag_04_94_01"></a>NAME</h4><blockquote>nm - write the name list of an object file (<b>DEVELOPMENT</b>)</blockquote><h4><a name="tag_04_94_02"></a>SYNOPSIS</h4><blockquote class="synopsis"><div class="box"><code><tt><sup>[<a href="javascript:open_code('UP SD XSI')">UP SD XSI</a>]</sup> <img src="../images/opt-start.gif" alt="[Option Start]" border="0"> nm</tt> <b>[</b><tt>-APv</tt><b>][</b><tt>-efox</tt><b>][</b> <tt>-g| -u</tt><b>][</b><tt>-t</tt><i>format</i><b>]</b> <i>file</i><tt>... <img src="../images/opt-end.gif" alt="[Option End]" border="0"></tt></code></div></blockquote><h4><a name="tag_04_94_03"></a>DESCRIPTION</h4><blockquote><p>This utility shall be provided on systems that support both the User Portability Utilities option and the Software DevelopmentUtilities option. On other systems it is optional. Certain options are only available on XSI-conformant systems.</p><p>The <i>nm</i> utility shall display symbolic information appearing in the object file, executable file, or object-file librarynamed by <i>file</i>. If no symbolic information is available for a valid input file, the <i>nm</i> utility shall report that fact,but not consider it an error condition.</p><p>The default base used when numeric values are written is unspecified. <sup>[<a href="javascript:open_code('XSI')">XSI</a>]</sup><img src="../images/opt-start.gif" alt="[Option Start]" border="0"> On XSI-conformant systems, it shall be decimal. <img src="../images/opt-end.gif" alt="[Option End]" border="0"></p></blockquote><h4><a name="tag_04_94_04"></a>OPTIONS</h4><blockquote><p>The <i>nm</i> utility shall conform to the Base Definitions volume of IEEE Std 1003.1-2001, <a href="../basedefs/xbd_chap12.html#tag_12_02">Section 12.2, Utility Syntax Guidelines</a>.</p><p>The following options shall be supported:</p><dl compact><dt><b>-A</b></dt><dd>Write the full pathname or library name of an object on each line.</dd><dt><b>-e</b></dt><dd><sup>[<a href="javascript:open_code('XSI')">XSI</a>]</sup> <img src="../images/opt-start.gif" alt="[Option Start]" border="0">Write only external (global) and static symbol information. <img src="../images/opt-end.gif" alt="[Option End]" border="0"></dd><dt><b>-f</b></dt><dd><sup>[<a href="javascript:open_code('XSI')">XSI</a>]</sup> <img src="../images/opt-start.gif" alt="[Option Start]" border="0">Produce full output. Write redundant symbols ( <b>.text</b>, <b>.data</b>, and <b>.bss</b>), normally suppressed. <img src="../images/opt-end.gif" alt="[Option End]" border="0"></dd><dt><b>-g</b></dt><dd>Write only external (global) symbol information.</dd><dt><b>-o</b></dt><dd><sup>[<a href="javascript:open_code('XSI')">XSI</a>]</sup> <img src="../images/opt-start.gif" alt="[Option Start]" border="0">Write numeric values in octal (equivalent to <b>-t o</b>). <img src="../images/opt-end.gif" alt="[Option End]" border="0"></dd><dt><b>-P</b></dt><dd>Write information in a portable output format, as specified in the STDOUT section.</dd><dt><b>-t </b> <i>format</i></dt><dd>Write each numeric value in the specified format. The format shall be dependent on the single character used as the<i>format</i> option-argument: <dl compact><dt><tt>d</tt></dt><dd>The offset is written in decimal <sup>[<a href="javascript:open_code('XSI')">XSI</a>]</sup> <img src="../images/opt-start.gif"alt="[Option Start]" border="0"> (default). <img src="../images/opt-end.gif" alt="[Option End]" border="0"></dd><dt><tt>o</tt></dt><dd>The offset is written in octal.</dd><dt><tt>x</tt></dt><dd>The offset is written in hexadecimal.</dd></dl></dd><dt><b>-u</b></dt><dd>Write only undefined symbols.</dd><dt><b>-v</b></dt><dd>Sort output by value instead of alphabetically.</dd><dt><b>-x</b></dt><dd><sup>[<a href="javascript:open_code('XSI')">XSI</a>]</sup> <img src="../images/opt-start.gif" alt="[Option Start]" border="0">Write numeric values in hexadecimal (equivalent to <b>-t x</b>). <img src="../images/opt-end.gif" alt="[Option End]" border="0"></dd></dl></blockquote><h4><a name="tag_04_94_05"></a>OPERANDS</h4><blockquote><p>The following operand shall be supported:</p><dl compact><dt><i>file</i></dt><dd>A pathname of an object file, executable file, or object-file library.</dd></dl></blockquote><h4><a name="tag_04_94_06"></a>STDIN</h4><blockquote><p>See the INPUT FILES section.</p></blockquote><h4><a name="tag_04_94_07"></a>INPUT FILES</h4><blockquote><p>The input file shall be an object file, an object-file library whose format is the same as those produced by the <a href="../utilities/ar.html"><i>ar</i></a> utility for link editing, or an executable file. The <i>nm</i> utility may accept additionalimplementation-defined object library formats for the input file.</p></blockquote><h4><a name="tag_04_94_08"></a>ENVIRONMENT VARIABLES</h4><blockquote><p>The following environment variables shall affect the execution of <i>nm</i>:</p><dl compact><dt><i>LANG</i></dt><dd>Provide a default value for the internationalization variables that are unset or null. (See the Base Definitions volume ofIEEE Std 1003.1-2001, <a href="../basedefs/xbd_chap08.html#tag_08_02">Section 8.2, Internationalization Variables</a> forthe precedence of internationalization variables used to determine the values of locale categories.)</dd><dt><i>LC_ALL</i></dt><dd>If set to a non-empty string value, override the values of all the other internationalization variables.</dd><dt><i>LC_COLLATE</i></dt><dd><br>Determine the locale for character collation information for the symbol-name and symbol-value collation sequences.</dd><dt><i>LC_CTYPE</i></dt><dd>Determine the locale for the interpretation of sequences of bytes of text data as characters (for example, single-byte asopposed to multi-byte characters in arguments).</dd><dt><i>LC_MESSAGES</i></dt><dd>Determine the locale that should be used to affect the format and contents of diagnostic messages written to standarderror.</dd><dt><i>NLSPATH</i></dt><dd><sup>[<a href="javascript:open_code('XSI')">XSI</a>]</sup> <img src="../images/opt-start.gif" alt="[Option Start]" border="0">Determine the location of message catalogs for the processing of <i>LC_MESSAGES .</i> <img src="../images/opt-end.gif" alt="[Option End]" border="0"></dd></dl></blockquote><h4><a name="tag_04_94_09"></a>ASYNCHRONOUS EVENTS</h4><blockquote><p>Default.</p></blockquote><h4><a name="tag_04_94_10"></a>STDOUT</h4><blockquote><p>If symbolic information is present in the input files, then for each file or for each member of an archive, the <i>nm</i>utility shall write the following information to standard output. By default, the format is unspecified, but the output shall besorted alphabetically by symbol name:</p><ul><li><p>Library or object name, if <b>-A</b> is specified</p></li><li><p>Symbol name</p></li><li><p>Symbol type, which shall either be one of the following single characters or an implementation-defined type represented by asingle character:</p><dl compact><dt><tt>A</tt></dt><dd>Global absolute symbol.</dd><dt><tt>a</tt></dt><dd>Local absolute symbol.</dd><dt><tt>B</tt></dt><dd>Global "bss" (that is, uninitialized data space) symbol.</dd><dt><tt>b</tt></dt><dd>Local bss symbol.</dd><dt><tt>D</tt></dt>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -