⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 nm.html

📁 unix 下的C开发手册,还用详细的例程。
💻 HTML
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"><html><head><!-- Copyright 1997 The Open Group, All Rights Reserved --><title>nm</title></head><body bgcolor=white><center><font size=2>The Single UNIX &reg; Specification, Version 2<br>Copyright &copy; 1997 The Open Group</font></center><hr size=2 noshade><h4><a name = "tag_001_014_1555">&nbsp;</a>NAME</h4><blockquote>nm - write the name list of an object file (<b>DEVELOPMENT</b>)</blockquote><h4><a name = "tag_001_014_1556">&nbsp;</a>SYNOPSIS</h4><blockquote><pre><code>nm <b>[</b>-APv<b>][</b>-efox<b>][</b> -g| -u<b>][</b>-t <i>format</i><b>]</b><i> file</i>...</code></pre></blockquote><h4><a name = "tag_001_014_1557">&nbsp;</a>DESCRIPTION</h4><blockquote>The<i>nm</i>utility displays symbolic information appearingin the object file, executable fileor object-file library named by<i>file</i>.If no symbolicinformation is available for a valid input file, the<i>nm</i>utility will report that fact,but not consider it an error condition.<p>The default base used when numeric values are written isdecimal.</blockquote><h4><a name = "tag_001_014_1558">&nbsp;</a>OPTIONS</h4><blockquote>The<i>nm</i>utility supports the <b>XBD</b> specification, <a href="../xbd/utilconv.html#usg"><b>Utility Syntax Guidelines</b>&nbsp;</a> .<p>The following options are supported:<dl compact><dt><b>-A</b><dd>Write the full pathname or library name of an object on each line.<dt><b>-e</b><dd>Write only external (global) and static symbol information.<dt><b>-f</b><dd>Produce full output.Write redundant symbols(<i>.text</i>,<i>.data</i>and<i>.bss</i>),normally suppressed.<dt><b>-g</b><dd>Write only external (global) symbol information.<dt><b>-o</b><dd>Write numeric values in octal(equivalent tot<b>-o</b>).<dt><b>-P</b><dd>Write information in a portable output format, as specified inthe STDOUT section.<dt><b>-t&nbsp;</b><i>format</i><dd>Write each numeric value in the specified format.The format is dependent on the singlecharacter used as the<i>format</i>option-argument:<dl compact><dt><b>d</b><dd>The offset is written in decimal(default).<dt><b>o</b><dd>The offset is written in octal.<dt><b>x</b><dd>The offset is written in hexadecimal.</dl><br><dt><b>-u</b><dd>Write only undefined symbols.<br><dt><b>-v</b><dd>Sort output by value instead of alphabetically.<br><dt><b>-x</b><dd>Write numeric values in hexadecimal(equivalent tot<b>-x</b>).<p></dl></blockquote><h4><a name = "tag_001_014_1559">&nbsp;</a>OPERANDS</h4><blockquote>The following operand is supported:<dl compact><dt><i>file</i><dd>A pathname ofan object file, executable file or object-file library.</dl></blockquote><h4><a name = "tag_001_014_1560">&nbsp;</a>STDIN</h4><blockquote>See the INPUT FILES section.</blockquote><h4><a name = "tag_001_014_1561">&nbsp;</a>INPUT FILES</h4><blockquote>The input file must be an object file, an object-file librarywhose format is the same as those produced by the<i><a href="ar.html">ar</a></i>utility for link editing,or an executable file.The<i>nm</i>utility may accept additional implementation-dependent objectlibrary formats for the input file.<br></blockquote><h4><a name = "tag_001_014_1562">&nbsp;</a>ENVIRONMENT VARIABLES</h4><blockquote>The following environment variables affect the execution of<i>nm</i>:<dl compact><dt><i>LANG</i><dd>Provide a default value for the internationalisation variablesthat are unset or null.If<i>LANG</i>is unset or null, the corresponding value from theimplementation-dependent default locale will be used.If any of the internationalisation variables contains an invalid setting, theutility will behave as if none of the variables had been defined.<dt><i>LC_ALL</i><dd>If set to a non-empty string value,override the values of all the other internationalisation variables.<dt><i>LC_COLLATE</i><dd>Determine thelocale for character collation informationfor the symbol-name and symbol-valuecollation sequences.<dt><i>LC_CTYPE</i><dd>Determine thelocale for the interpretation of sequences of bytes of text data ascharacters (for example, single- as opposed to multi-byte charactersin arguments).<dt><i>LC_MESSAGES</i><dd>Determine the locale that should be used to affectthe format and contents of diagnosticmessages written to standard error.<dt><i>NLSPATH</i><dd>Determine the location of message cataloguesfor the processing of<i>LC_MESSAGES .</i></dl></blockquote><h4><a name = "tag_001_014_1563">&nbsp;</a>ASYNCHRONOUS EVENTS</h4><blockquote>Default.</blockquote><h4><a name = "tag_001_014_1564">&nbsp;</a>STDOUT</h4><blockquote>If symbolic information is present in the input files, then for eachfile or for each member of an archive, the<i>nm</i>utility will write the following information to standard output.By default, the format is unspecified, but the output is sortedalphabetically by symbol name.<ul><p><li>Library or object name, if<b>-A</b>is specified.<p><li>Symbol name.<p><li>Symbol type, which is either one of the followingsingle characters or animplementation-dependent type represented by a single character:<dl compact><dt><b>A</b><dd>Global absolute symbol.<dt><b>a</b><dd>Local absolute symbol.<dt><b>B</b><dd>Global &quot;bss&quot; (that is, uninitialised data space) symbol.<dt><b>b</b><dd>Local bss symbol.<dt><b>D</b><dd>Global data symbol.<dt><b>d</b><dd>Local data symbol.<dt><b>T</b><dd>Global text symbol.<dt><b>t</b><dd>Local text symbol.<dt><b>U</b><dd>Undefined symbol.</dl><p><li>Value of the symbol.<p><li>The size associated with the symbol, if applicable.<p></ul><p>This informationmay be supplemented by additional information specific to theimplementation.<p>If the<b>-P</b>option is specified,the previous information is displayed usingthe following portable format.The three versions differ depending on whether<b>-t d</b>,<b>-t o</b>or<b>-t x</b>was specified, respectively:<p><code><pre><tt>"%s%s %s %d %d\n"</tt>, &lt;<i>library/object&nbsp;name</i>&gt;,&lt;<i>name</i>&gt;,&lt;<i>type</i>&gt;,&lt;<i>value</i>&gt;,&lt;<i>size</i>&gt;<tt>"%s%s %s %o %o\n"</tt>, &lt;<i>library/object&nbsp;name</i>&gt;,&lt;<i>name</i>&gt;,&lt;<i>type</i>&gt;,&lt;<i>value</i>&gt;,&lt;<i>size</i>&gt;<tt>"%s%s %s %x %x\n"</tt>, &lt;<i>library/object&nbsp;name</i>&gt;,&lt;<i>name</i>&gt;,&lt;<i>type</i>&gt;,&lt;<i>value</i>&gt;,&lt;<i>size</i>&gt;<br></code></pre>where&lt;<i>library/object&nbsp;name</i>&gt;is formatted as follows:<ul><p><li>If<b>-A</b>is not specified,&lt;<i>library/object&nbsp;name</i>&gt;is an empty string.<p><li>If<b>-A</b>is specified and the corresponding<i>file</i>operand does not name a library:<p><code><tt>"%s: "</tt>, &lt;<i>file</i>&gt;</code><p><li>If<b>-A</b>is specified and the corresponding<i>file</i>operand names a library.In this case,&lt;<i>object&nbsp;file</i>&gt;names the object filein the library containing the symbol being described:<p><code><tt>"%s[%s]: "</tt>, &lt;<i>file</i>&gt;,&lt;<i>object file</i>&gt;</code><p></ul><p>If<b>-A</b>is not specified, then if more than one<i>file</i>operand isspecified or if only one<i>file</i>operand is specified and it namesa library,<i>nm</i>will write a line identifying the object containing the followingsymbols before the lines containing thosesymbols, in the form:<ul><p><li>If the corresponding<i>file</i>operand does not name a library:<p><code><tt>"%s:\n"</tt>, &lt;<i>file</i>&gt;</code><p><li>If the corresponding<i>file</i>operand names a library;in this case,&lt;<i>object&nbsp;file</i>&gt;is the name of thefile in the library containing thefollowing symbols:<p><code><tt>"%s[%s]:\n"</tt>, &lt;<i>file</i>&gt;,&lt;<i>object file</i>&gt;</code><p></ul><p>If<b>-P</b>is specified, but<b>-t</b>is not, the format is as if<b>-t x</b>had been specified.</blockquote><h4><a name = "tag_001_014_1565">&nbsp;</a>STDERR</h4><blockquote>Used only for diagnostic messages.</blockquote><h4><a name = "tag_001_014_1566">&nbsp;</a>OUTPUT FILES</h4><blockquote>None.</blockquote><h4><a name = "tag_001_014_1567">&nbsp;</a>EXTENDED DESCRIPTION</h4><blockquote>None.</blockquote><h4><a name = "tag_001_014_1568">&nbsp;</a>EXIT STATUS</h4><blockquote>The following exit values are returned:<dl compact><dt>0<dd>Successful completion.<dt>&gt;0<dd>An error occurred.</dl></blockquote><h4><a name = "tag_001_014_1569">&nbsp;</a>CONSEQUENCES OF ERRORS</h4><blockquote>Default.<br></blockquote><h4><a name = "tag_001_014_1570">&nbsp;</a>APPLICATION USAGE</h4><blockquote>Mechanisms for dynamic linking make thisutility less meaningful when applied to anexecutable file because a dynamicallylinked executable may omit numerous library routines that wouldbe found in a statically linked executable.</blockquote><h4><a name = "tag_001_014_1571">&nbsp;</a>EXAMPLES</h4><blockquote>None.</blockquote><h4><a name = "tag_001_014_1572">&nbsp;</a>FUTURE DIRECTIONS</h4><blockquote>None.</blockquote><h4><a name = "tag_001_014_1573">&nbsp;</a>SEE ALSO</h4><blockquote><i><a href="ar.html">ar</a></i>,<i><a href="c89.html">c89</a></i>.</blockquote><hr size=2 noshade><center><font size=2>UNIX &reg; is a registered Trademark of The Open Group.<br>Copyright &copy; 1997 The Open Group<br> [ <a href="../index.html">Main Index</a> | <a href="../xshix.html">XSH</a> | <a href="../xcuix.html">XCU</a> | <a href="../xbdix.html">XBD</a> | <a href="../cursesix.html">XCURSES</a> | <a href="../xnsix.html">XNS</a> ]</font></center><hr size=2 noshade></body></html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -