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

📄 overview.html

📁 gcc手册
💻 HTML
📖 第 1 页 / 共 2 页
字号:
<html lang="en">

<head>

<title>Using as</title>

<meta http-equiv="Content-Type" content="text/html">

<meta name="description" content="Using as">

<meta name="generator" content="makeinfo 4.3">

<link href="http://www.gnu.org/software/texinfo/" rel="generator-home">

</head>

<body>

<div class="node">

<p>

Node:<a name="Overview">Overview</a>,

Next:<a rel="next" accesskey="n" href="Invoking.html#Invoking">Invoking</a>,

Previous:<a rel="previous" accesskey="p" href="index.html#Top">Top</a>,

Up:<a rel="up" accesskey="u" href="index.html#Top">Top</a>

<hr><br>

</div>



<h2 class="chapter">Overview</h2>



   <p>Here is a brief summary of how to invoke <code>as</code>.  For details,

see <a href="Invoking.html#Invoking">Comand-Line Options</a>.



<pre class="smallexample">     as [<b>-a</b>[<b>cdhlns</b>][=<var>file</var>]] [<b>-D</b>] [<b>--defsym</b> <var>sym</var>=<var>val</var>]

      [<b>-f</b>] [<b>--gstabs</b>] [<b>--gdwarf2</b>] [<b>--help</b>] [<b>-I</b> <var>dir</var>]

      [<b>-J</b>] [<b>-K</b>] [<b>-L</b>]

      [<b>--listing-lhs-width</b>=<var>NUM</var>] [<b>--listing-lhs-width2</b>=<var>NUM</var>]

      [<b>--listing-rhs-width</b>=<var>NUM</var>] [<b>--listing-cont-lines</b>=<var>NUM</var>]

      [<b>--keep-locals</b>] [<b>-o</b> <var>objfile</var>] [<b>-R</b>] [<b>--statistics</b>] [<b>-v</b>]

      [<b>-version</b>] [<b>--version</b>] [<b>-W</b>] [<b>--warn</b>] [<b>--fatal-warnings</b>]

      [<b>-w</b>] [<b>-x</b>] [<b>-Z</b>] [<b>--target-help</b>] [<var>target-options</var>]

      [<b>--</b>|<var>files</var> ...]

     

     <em>Target Alpha options:</em>

        [<b>-m</b><var>cpu</var><b></b>]

        [<b>-mdebug</b> | <b>-no-mdebug</b>]

        [<b>-relax</b>] [<b>-g</b>] [<b>-G</b><var>size</var><b></b>]

        [<b>-F</b>] [<b>-32addr</b>]

     

     <em>Target ARC options:</em>

        [<b>-marc[5|6|7|8]</b>]

        [<b>-EB</b>|<b>-EL</b>]

     

     <em>Target ARM options:</em>

        [<b>-mcpu</b>=<var>processor</var>[+<var>extension</var>...]]

        [<b>-march</b>=<var>architecture</var>[+<var>extension</var>...]]

        [<b>-mfpu</b>=<var>floating-point-fromat</var>]

        [<b>-mthumb</b>]

        [<b>-EB</b>|<b>-EL</b>]

        [<b>-mapcs-32</b>|<b>-mapcs-26</b>|<b>-mapcs-float</b>|

         <b>-mapcs-reentrant</b>]

        [<b>-mthumb-interwork</b>] [<b>-moabi</b>] [<b>-k</b>]

     

     <em>Target CRIS options:</em>

        [<b>--underscore</b> | <b>--no-underscore</b>]

        [<b>--pic</b>] [<b>-N</b>]

        [<b>--emulation=criself</b> | <b>--emulation=crisaout</b>]

     

     <em>Target D10V options:</em>

        [<b>-O</b>]

     

     <em>Target D30V options:</em>

        [<b>-O</b>|<b>-n</b>|<b>-N</b>]

     

     <em>Target i386 options:</em>

        [<b>--32</b>|<b>--64</b>]

     

     <em>Target i960 options:</em>

        [<b>-ACA</b>|<b>-ACA_A</b>|<b>-ACB</b>|<b>-ACC</b>|<b>-AKA</b>|<b>-AKB</b>|

         <b>-AKC</b>|<b>-AMC</b>]

        [<b>-b</b>] [<b>-no-relax</b>]

     

     <em>Target M32R options:</em>

        [<b>--m32rx</b>|<b>--[no-]warn-explicit-parallel-conflicts</b>|

        <b>--W[n]p</b>]

     

     <em>Target M680X0 options:</em>

        [<b>-l</b>] [<b>-m68000</b>|<b>-m68010</b>|<b>-m68020</b>|...]

     

     <em>Target M68HC11 options:</em>

        [<b>-m68hc11</b>|<b>-m68hc12</b>]

        [<b>--force-long-branchs</b>] [<b>--short-branchs</b>]

        [<b>--strict-direct-mode</b>] [<b>--print-insn-syntax</b>]

        [<b>--print-opcodes</b>] [<b>--generate-example</b>]

     

     <em>Target MCORE options:</em>

        [<b>-jsri2bsr</b>] [<b>-sifilter</b>] [<b>-relax</b>]

        [<b>-mcpu=[210|340]</b>]

     

     <em>Target MIPS options:</em>

        [<b>-nocpp</b>] [<b>-EL</b>] [<b>-EB</b>] [<b>-n</b>] [<b>-O</b>[<var>optimization level</var>]]

        [<b>-g</b>[<var>debug level</var>]] [<b>-G</b> <var>num</var>] [<b>-KPIC</b>] [<b>-call_shared</b>]

        [<b>-non_shared</b>] [<b>-xgot</b>] [<b>--membedded-pic</b>]

        [<b>-mabi</b>=<var>ABI</var>] [<b>-32</b>] [<b>-n32</b>] [<b>-64</b>] [<b>-mfp32</b>] [<b>-mgp32</b>]

        [<b>-march</b>=<var>CPU</var>] [<b>-mtune</b>=<var>CPU</var>] [<b>-mips1</b>] [<b>-mips2</b>]

        [<b>-mips3</b>] [<b>-mips4</b>] [<b>-mips5</b>] [<b>-mips32</b>] [<b>-mips64</b>]

        [<b>-construct-floats</b>] [<b>-no-construct-floats</b>]

        [<b>-trap</b>] [<b>-no-break</b>] [<b>-break</b>] [<b>-no-trap</b>]

        [<b>-mfix7000</b>] [<b>-mno-fix7000</b>]

        [<b>-mips16</b>] [<b>-no-mips16</b>]

        [<b>-mips3d</b>] [<b>-no-mips3d</b>]

        [<b>-mdmx</b>] [<b>-no-mdmx</b>]

        [<b>-mdebug</b>] [<b>-no-mdebug</b>]

     

     <em>Target MMIX options:</em>

        [<b>--fixed-special-register-names</b>] [<b>--globalize-symbols</b>]

        [<b>--gnu-syntax</b>] [<b>--relax</b>] [<b>--no-predefined-symbols</b>]

        [<b>--no-expand</b>] [<b>--no-merge-gregs</b>] [<b>-x</b>]

        [<b>--linker-allocated-gregs</b>]

     

     <em>Target PDP11 options:</em>

        [<b>-mpic</b>|<b>-mno-pic</b>] [<b>-mall</b>] [<b>-mno-extensions</b>]

        [<b>-m</b><var>extension</var>|<b>-mno-</b><var>extension</var>]

        [<b>-m</b><var>cpu</var>] [<b>-m</b><var>machine</var>]

     

     <em>Target picoJava options:</em>

        [<b>-mb</b>|<b>-me</b>]

     

     <em>Target PowerPC options:</em>

        [<b>-mpwrx</b>|<b>-mpwr2</b>|<b>-mpwr</b>|<b>-m601</b>|<b>-mppc</b>|<b>-mppc32</b>|<b>-m603</b>|<b>-m604</b>|

         <b>-m403</b>|<b>-m405</b>|<b>-mppc64</b>|<b>-m620</b>|<b>-mppc64bridge</b>|<b>-mbooke</b>|

         <b>-mbooke32</b>|<b>-mbooke64</b>]

        [<b>-mcom</b>|<b>-many</b>|<b>-maltivec</b>] [<b>-memb</b>]

        [<b>-mregnames</b>|<b>-mno-regnames</b>]

        [<b>-mrelocatable</b>|<b>-mrelocatable-lib</b>]

        [<b>-mlittle</b>|<b>-mlittle-endian</b>|<b>-mbig</b>|<b>-mbig-endian</b>]

        [<b>-msolaris</b>|<b>-mno-solaris</b>]

     

     <em>Target SPARC options:</em>

        [<b>-Av6</b>|<b>-Av7</b>|<b>-Av8</b>|<b>-Asparclet</b>|<b>-Asparclite</b>

         <b>-Av8plus</b>|<b>-Av8plusa</b>|<b>-Av9</b>|<b>-Av9a</b>]

        [<b>-xarch=v8plus</b>|<b>-xarch=v8plusa</b>] [<b>-bump</b>]

        [<b>-32</b>|<b>-64</b>]

     </pre>



     <dl>

<dt><code>-a[cdhlmns]</code>

     <dd>Turn on listings, in any of a variety of ways:



          <dl>

<dt><code>-ac</code>

          <dd>omit false conditionals



          <br><dt><code>-ad</code>

          <dd>omit debugging directives



          <br><dt><code>-ah</code>

          <dd>include high-level source



          <br><dt><code>-al</code>

          <dd>include assembly



          <br><dt><code>-am</code>

          <dd>include macro expansions



          <br><dt><code>-an</code>

          <dd>omit forms processing



          <br><dt><code>-as</code>

          <dd>include symbols



          <br><dt><code>=file</code>

          <dd>set the name of the listing file

</dl>



     <p>You may combine these options; for example, use <code>-aln</code> for assembly

listing without forms processing.  The <code>=file</code> option, if used, must be

the last one.  By itself, <code>-a</code> defaults to <code>-ahls</code>.



     <br><dt><code>-D</code>

     <dd>Ignored.  This option is accepted for script compatibility with calls to

other assemblers.



     <br><dt><code>--defsym </code><var>sym</var><code>=</code><var>value</var><code></code>

     <dd>Define the symbol <var>sym</var> to be <var>value</var> before assembling the input file. 

<var>value</var> must be an integer constant.  As in C, a leading <code>0x</code>

indicates a hexadecimal value, and a leading <code>0</code> indicates an octal value.



     <br><dt><code>-f</code>

     <dd>"fast"--skip whitespace and comment preprocessing (assume source is

compiler output).



     <br><dt><code>--gstabs</code>

     <dd>Generate stabs debugging information for each assembler line.  This

may help debugging assembler code, if the debugger can handle it.



     <br><dt><code>--gdwarf2</code>

     <dd>Generate DWARF2 debugging information for each assembler line.  This

may help debugging assembler code, if the debugger can handle it.  Note - this

option is only supported by some targets, not all of them.



     <br><dt><code>--help</code>

     <dd>Print a summary of the command line options and exit.



     <br><dt><code>--target-help</code>

     <dd>Print a summary of all target specific options and exit.



     <br><dt><code>-I </code><var>dir</var><code></code>

     <dd>Add directory <var>dir</var> to the search list for <code>.include</code> directives.



     <br><dt><code>-J</code>

     <dd>Don't warn about signed overflow.



     <br><dt><code>-K</code>

     <dd>Issue warnings when difference tables altered for long displacements.



     <br><dt><code>-L</code>

     <dd><dt><code>--keep-locals</code>

     <dd>Keep (in the symbol table) local symbols.  On traditional a.out systems

these start with <code>L</code>, but different systems have different local

label prefixes.



     <br><dt><code>--listing-lhs-width=</code><var>number</var><code></code>

     <dd>Set the maximum width, in words, of the output data column for an assembler

listing to <var>number</var>.



     <br><dt><code>--listing-lhs-width2=</code><var>number</var><code></code>

     <dd>Set the maximum width, in words, of the output data column for continuation

lines in an assembler listing to <var>number</var>.



     <br><dt><code>--listing-rhs-width=</code><var>number</var><code></code>

     <dd>Set the maximum width of an input source line, as displayed in a listing, to

<var>number</var> bytes.



     <br><dt><code>--listing-cont-lines=</code><var>number</var><code></code>

     <dd>Set the maximum number of lines printed in a listing for a single line of input

to <var>number</var> + 1.



     <br><dt><code>-o </code><var>objfile</var><code></code>

     <dd>Name the object-file output from <code>as</code> <var>objfile</var>.



     <br><dt><code>-R</code>

     <dd>Fold the data section into the text section.



     <br><dt><code>--statistics</code>

     <dd>Print the maximum space (in bytes) and total time (in seconds) used by

assembly.



     <br><dt><code>--strip-local-absolute</code>

     <dd>Remove local absolute symbols from the outgoing symbol table.



     <br><dt><code>-v</code>

     <dd><dt><code>-version</code>

     <dd>Print the <code>as</code> version.



     <br><dt><code>--version</code>

     <dd>Print the <code>as</code> version and exit.



     <br><dt><code>-W</code>

     <dd><dt><code>--no-warn</code>

     <dd>Suppress warning messages.



     <br><dt><code>--fatal-warnings</code>

     <dd>Treat warnings as errors.



     <br><dt><code>--warn</code>

     <dd>Don't suppress warning messages or treat them as errors.



     <br><dt><code>-w</code>

     <dd>Ignored.



     <br><dt><code>-x</code>

     <dd>Ignored.



     <br><dt><code>-Z</code>

     <dd>Generate an object file even after errors.



     <br><dt><code>-- | </code><var>files</var><code> ...</code>

     <dd>Standard input, or source files to assemble.



   </dl>



   <p>The following options are available when as is configured for

an ARC processor.



     <dl>

<dt><code>-marc[5|6|7|8]</code>

     <dd>This option selects the core processor variant. 

<br><dt><code>-EB | -EL</code>

     <dd>Select either big-endian (-EB) or little-endian (-EL) output. 

</dl>



   <p>The following options are available when as is configured for the ARM

processor family.



     <dl>

<dt><code>-mcpu=</code><var>processor</var><code>[+</code><var>extension</var><code>...]</code>

     <dd>Specify which ARM processor variant is the target. 

<br><dt><code>-march=</code><var>architecture</var><code>[+</code><var>extension</var><code>...]</code>

     <dd>Specify which ARM architecture variant is used by the target. 

<br><dt><code>-mfpu=</code><var>floating-point-format</var><code></code>

     <dd>Select which Floating Point architecture is the target. 

<br><dt><code>-mthumb</code>

     <dd>Enable Thumb only instruction decoding. 

<br><dt><code>-mapcs-32 | -mapcs-26 | -mapcs-float | -mapcs-reentrant | -moabi</code>

     <dd>Select which procedure calling convention is in use. 

<br><dt><code>-EB | -EL</code>

     <dd>Select either big-endian (-EB) or little-endian (-EL) output. 

<br><dt><code>-mthumb-interwork</code>

     <dd>Specify that the code has been generated with interworking between Thumb and

ARM code in mind. 

<br><dt><code>-k</code>

     <dd>Specify that PIC code has been generated. 

</dl>



   <p>See the info pages for documentation of the CRIS-specific options.



   <p>The following options are available when as is configured for

a D10V processor.

     <dl>

<dt><code>-O</code>

     <dd>Optimize output by parallelizing instructions. 

</dl>



   <p>The following options are available when as is configured for a D30V

processor.

     <dl>

<dt><code>-O</code>

     <dd>Optimize output by parallelizing instructions.



     <br><dt><code>-n</code>

     <dd>Warn when nops are generated.



     <br><dt><code>-N</code>

     <dd>Warn when a nop after a 32-bit multiply instruction is generated. 

</dl>

⌨️ 快捷键说明

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