Ви не можете вибрати більше 25 тем Теми мають розпочинатися з літери або цифри, можуть містити дефіси (-) і не повинні перевищувати 35 символів.

3 роки тому
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
  2. <html>
  3. <!-- This file documents the GNU Assembler "as".
  4. Copyright (C) 1991-2020 Free Software Foundation, Inc.
  5. Permission is granted to copy, distribute and/or modify this document
  6. under the terms of the GNU Free Documentation License, Version 1.3
  7. or any later version published by the Free Software Foundation;
  8. with no Invariant Sections, with no Front-Cover Texts, and with no
  9. Back-Cover Texts. A copy of the license is included in the
  10. section entitled "GNU Free Documentation License".
  11. -->
  12. <!-- Created by GNU Texinfo 6.5, http://www.gnu.org/software/texinfo/ -->
  13. <head>
  14. <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  15. <title>Invoking (Using as)</title>
  16. <meta name="description" content="Invoking (Using as)">
  17. <meta name="keywords" content="Invoking (Using as)">
  18. <meta name="resource-type" content="document">
  19. <meta name="distribution" content="global">
  20. <meta name="Generator" content="makeinfo">
  21. <link href="index.html#Top" rel="start" title="Top">
  22. <link href="AS-Index.html#AS-Index" rel="index" title="AS Index">
  23. <link href="index.html#SEC_Contents" rel="contents" title="Table of Contents">
  24. <link href="index.html#Top" rel="up" title="Top">
  25. <link href="a.html#a" rel="next" title="a">
  26. <link href="Errors.html#Errors" rel="prev" title="Errors">
  27. <style type="text/css">
  28. <!--
  29. a.summary-letter {text-decoration: none}
  30. blockquote.indentedblock {margin-right: 0em}
  31. blockquote.smallindentedblock {margin-right: 0em; font-size: smaller}
  32. blockquote.smallquotation {font-size: smaller}
  33. div.display {margin-left: 3.2em}
  34. div.example {margin-left: 3.2em}
  35. div.lisp {margin-left: 3.2em}
  36. div.smalldisplay {margin-left: 3.2em}
  37. div.smallexample {margin-left: 3.2em}
  38. div.smalllisp {margin-left: 3.2em}
  39. kbd {font-style: oblique}
  40. pre.display {font-family: inherit}
  41. pre.format {font-family: inherit}
  42. pre.menu-comment {font-family: serif}
  43. pre.menu-preformatted {font-family: serif}
  44. pre.smalldisplay {font-family: inherit; font-size: smaller}
  45. pre.smallexample {font-size: smaller}
  46. pre.smallformat {font-family: inherit; font-size: smaller}
  47. pre.smalllisp {font-size: smaller}
  48. span.nolinebreak {white-space: nowrap}
  49. span.roman {font-family: initial; font-weight: normal}
  50. span.sansserif {font-family: sans-serif; font-weight: normal}
  51. ul.no-bullet {list-style: none}
  52. -->
  53. </style>
  54. </head>
  55. <body lang="en">
  56. <a name="Invoking"></a>
  57. <div class="header">
  58. <p>
  59. Next: <a href="Syntax.html#Syntax" accesskey="n" rel="next">Syntax</a>, Previous: <a href="Overview.html#Overview" accesskey="p" rel="prev">Overview</a>, Up: <a href="index.html#Top" accesskey="u" rel="up">Top</a> &nbsp; [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="AS-Index.html#AS-Index" title="Index" rel="index">Index</a>]</p>
  60. </div>
  61. <hr>
  62. <a name="Command_002dLine-Options"></a>
  63. <h2 class="chapter">2 Command-Line Options</h2>
  64. <a name="index-options_002c-all-versions-of-assembler"></a>
  65. <p>This chapter describes command-line options available in <em>all</em>
  66. versions of the <small>GNU</small> assembler; see <a href="Machine-Dependencies.html#Machine-Dependencies">Machine Dependencies</a>,
  67. for options specific
  68. to particular machine architectures.
  69. </p>
  70. <p>If you are invoking <code>as</code> via the <small>GNU</small> C compiler,
  71. you can use the &lsquo;<samp>-Wa</samp>&rsquo; option to pass arguments through to the assembler.
  72. The assembler arguments must be separated from each other (and the &lsquo;<samp>-Wa</samp>&rsquo;)
  73. by commas. For example:
  74. </p>
  75. <div class="smallexample">
  76. <pre class="smallexample">gcc -c -g -O -Wa,-alh,-L file.c
  77. </pre></div>
  78. <p>This passes two options to the assembler: &lsquo;<samp>-alh</samp>&rsquo; (emit a listing to
  79. standard output with high-level and assembly source) and &lsquo;<samp>-L</samp>&rsquo; (retain
  80. local symbols in the symbol table).
  81. </p>
  82. <p>Usually you do not need to use this &lsquo;<samp>-Wa</samp>&rsquo; mechanism, since many compiler
  83. command-line options are automatically passed to the assembler by the compiler.
  84. (You can call the <small>GNU</small> compiler driver with the &lsquo;<samp>-v</samp>&rsquo; option to see
  85. precisely what options it passes to each compilation pass, including the
  86. assembler.)
  87. </p>
  88. <table class="menu" border="0" cellspacing="0">
  89. <tr><td align="left" valign="top">&bull; <a href="a.html#a" accesskey="1">a</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">-a[cdghlns] enable listings
  90. </td></tr>
  91. <tr><td align="left" valign="top">&bull; <a href="alternate.html#alternate" accesskey="2">alternate</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">&ndash;alternate enable alternate macro syntax
  92. </td></tr>
  93. <tr><td align="left" valign="top">&bull; <a href="D.html#D" accesskey="3">D</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">-D for compatibility
  94. </td></tr>
  95. <tr><td align="left" valign="top">&bull; <a href="f.html#f" accesskey="4">f</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">-f to work faster
  96. </td></tr>
  97. <tr><td align="left" valign="top">&bull; <a href="I.html#I" accesskey="5">I</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">-I for .include search path
  98. </td></tr>
  99. <tr><td align="left" valign="top">&bull; <a href="K.html#K" accesskey="6">K</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">-K for difference tables
  100. </td></tr>
  101. <tr><th colspan="3" align="left" valign="top"><pre class="menu-comment">
  102. </pre></th></tr><tr><td align="left" valign="top">&bull; <a href="L.html#L" accesskey="7">L</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">-L to retain local symbols
  103. </td></tr>
  104. <tr><td align="left" valign="top">&bull; <a href="listing.html#listing" accesskey="8">listing</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">&ndash;listing-XXX to configure listing output
  105. </td></tr>
  106. <tr><td align="left" valign="top">&bull; <a href="M.html#M" accesskey="9">M</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">-M or &ndash;mri to assemble in MRI compatibility mode
  107. </td></tr>
  108. <tr><td align="left" valign="top">&bull; <a href="MD.html#MD">MD</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">&ndash;MD for dependency tracking
  109. </td></tr>
  110. <tr><td align="left" valign="top">&bull; <a href="no_002dpad_002dsections.html#no_002dpad_002dsections">no-pad-sections</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">&ndash;no-pad-sections to stop section padding
  111. </td></tr>
  112. <tr><td align="left" valign="top">&bull; <a href="o.html#o">o</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">-o to name the object file
  113. </td></tr>
  114. <tr><td align="left" valign="top">&bull; <a href="R.html#R">R</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">-R to join data and text sections
  115. </td></tr>
  116. <tr><td align="left" valign="top">&bull; <a href="statistics.html#statistics">statistics</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">&ndash;statistics to see statistics about assembly
  117. </td></tr>
  118. <tr><td align="left" valign="top">&bull; <a href="traditional_002dformat.html#traditional_002dformat">traditional-format</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">&ndash;traditional-format for compatible output
  119. </td></tr>
  120. <tr><td align="left" valign="top">&bull; <a href="v.html#v">v</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">-v to announce version
  121. </td></tr>
  122. <tr><td align="left" valign="top">&bull; <a href="W.html#W">W</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">-W, &ndash;no-warn, &ndash;warn, &ndash;fatal-warnings to control warnings
  123. </td></tr>
  124. <tr><td align="left" valign="top">&bull; <a href="Z.html#Z">Z</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">-Z to make object file even after errors
  125. </td></tr>
  126. </table>
  127. <hr>
  128. <div class="header">
  129. <p>
  130. Next: <a href="Syntax.html#Syntax" accesskey="n" rel="next">Syntax</a>, Previous: <a href="Overview.html#Overview" accesskey="p" rel="prev">Overview</a>, Up: <a href="index.html#Top" accesskey="u" rel="up">Top</a> &nbsp; [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="AS-Index.html#AS-Index" title="Index" rel="index">Index</a>]</p>
  131. </div>
  132. </body>
  133. </html>