AS(1)

๐Ÿ“ฆ
version 2.16.1 ยท 3 versions
, in debian bookworm, ubuntu jammy, ubuntu noble

๐Ÿ’– AS(1) โ€” the portable GNU assembler ๐Ÿ’–

GNU Development Tools found her. This is as, bestie. She's not just one assembler, she's a whole family. ๐Ÿ’…

๐ŸŽ€ NAME ๐ŸŽ€

as โ€” the portable GNU assembler. Iconic. Portable. GNU. Periodt. โœจ

๐ŸŒธ SYNOPSIS ๐ŸŒธ

okay so here's the summoning circle. Copy-paste energy, no cap:

       as [-a[cdhlns][=file]] [--alternate] [-D]
        [--defsym sym=val] [-f] [-g] [--gstabs] [--gstabs+]
        [--gdwarf-2] [--help] [-I dir] [-J] [-K] [-L]
        [--listing-lhs-width=NUM] [--listing-lhs-width2=NUM]
        [--listing-rhs-width=NUM] [--listing-cont-lines=NUM]
        [--keep-locals] [-o objfile] [-R] [--statistics] [-v]
        [-version] [--version] [-W] [--warn] [--fatal-warnings]
        [-w] [-x] [-Z] [--target-help] [target-options]
        [--โŽชfiles ...]

       Target Alpha options:
          [-mcpu]
          [-mdebug โŽช -no-mdebug]
          [-relax] [-g] [-Gsize]
          [-F] [-32addr]

       Target ARC options:
          [-marc[5โŽช6โŽช7โŽช8]]
          [-EBโŽช-EL]

       Target ARM options:
          [-mcpu=processor[+extension...]]
          [-march=architecture[+extension...]]
          [-mfpu=floating-point-format]
          [-mfloat-abi=abi]
          [-meabi=ver]
          [-mthumb]
          [-EBโŽช-EL]
          [-mapcs-32โŽช-mapcs-26โŽช-mapcs-floatโŽช
           -mapcs-reentrant]
          [-mthumb-interwork] [-k]

       Target CRIS options:
          [--underscore โŽช --no-underscore]
          [--pic] [-N]
          [--emulation=criself โŽช --emulation=crisaout]
          [--march=v0_v10 โŽช --march=v10 โŽช --march=v32 โŽช --march=common_v10_v32]

       Target D10V options:
          [-O]

       Target D30V options:
          [-OโŽช-nโŽช-N]

       Target i386 options:
          [--32โŽช--64] [-n]

       Target i960 options:
          [-ACAโŽช-ACA_AโŽช-ACBโŽช-ACCโŽช-AKAโŽช-AKBโŽช
           -AKCโŽช-AMC]
          [-b] [-no-relax]

       Target IA-64 options:
          [-mconstant-gpโŽช-mauto-pic]
          [-milp32โŽช-milp64โŽช-mlp64โŽช-mp64]
          [-mleโŽชmbe]
          [-munwind-check=warningโŽช-munwind-check=error]
          [-mhint.b=okโŽช-mhint.b=warningโŽช-mhint.b=error]
          [-xโŽช-xexplicit] [-xauto] [-xdebug]

       Target IP2K options:
          [-mip2022โŽช-mip2022ext]

       Target M32R options:
          [--m32rxโŽช--[no-]warn-explicit-parallel-conflictsโŽช
          --W[n]p]

       Target M680X0 options:
          [-l] [-m68000โŽช-m68010โŽช-m68020โŽช...]

       Target M68HC11 options:
          [-m68hc11โŽช-m68hc12โŽช-m68hcs12]
          [-mshortโŽช-mlong]
          [-mshort-doubleโŽช-mlong-double]
          [--force-long-branchs] [--short-branchs]
          [--strict-direct-mode] [--print-insn-syntax]
          [--print-opcodes] [--generate-example]

       Target MCORE options:
          [-jsri2bsr] [-sifilter] [-relax]
          [-mcpu=[210โŽช340]]

       Target MIPS options:
          [-nocpp] [-EL] [-EB] [-O[optimization level]]
          [-g[debug level]] [-G num] [-KPIC] [-call_shared]
          [-non_shared] [-xgot]
          [-mabi=ABI] [-32] [-n32] [-64] [-mfp32] [-mgp32]
          [-march=CPU] [-mtune=CPU] [-mips1] [-mips2]
          [-mips3] [-mips4] [-mips5] [-mips32] [-mips32r2]
          [-mips64] [-mips64r2]
          [-construct-floats] [-no-construct-floats]
          [-trap] [-no-break] [-break] [-no-trap]
          [-mfix7000] [-mno-fix7000]
          [-mips16] [-no-mips16]
          [-mips3d] [-no-mips3d]
          [-mdmx] [-no-mdmx]
          [-mdebug] [-no-mdebug]
          [-mpdr] [-mno-pdr]

       Target MMIX options:
          [--fixed-special-register-names] [--globalize-symbols]
          [--gnu-syntax] [--relax] [--no-predefined-symbols]
          [--no-expand] [--no-merge-gregs] [-x]
          [--linker-allocated-gregs]

       Target PDP11 options:
          [-mpicโŽช-mno-pic] [-mall] [-mno-extensions]
          [-mextensionโŽช-mno-extension]
          [-mcpu] [-mmachine]

       Target picoJava options:
          [-mbโŽช-me]

       Target PowerPC options:
          [-mpwrxโŽช-mpwr2โŽช-mpwrโŽช-m601โŽช-mppcโŽช-mppc32โŽช-m603โŽช-m604โŽช
           -m403โŽช-m405โŽช-mppc64โŽช-m620โŽช-mppc64bridgeโŽช-mbookeโŽช
           -mbooke32โŽช-mbooke64]
          [-mcomโŽช-manyโŽช-maltivec] [-memb]
          [-mregnamesโŽช-mno-regnames]
          [-mrelocatableโŽช-mrelocatable-lib]
          [-mlittleโŽช-mlittle-endianโŽช-mbigโŽช-mbig-endian]
          [-msolarisโŽช-mno-solaris]

       Target SPARC options:
          [-Av6โŽช-Av7โŽช-Av8โŽช-AsparcletโŽช-Asparclite
           -Av8plusโŽช-Av8plusaโŽช-Av9โŽช-Av9a]
          [-xarch=v8plusโŽช-xarch=v8plusa] [-bump]
          [-32โŽช-64]

       Target TIC54X options:
        [-mcpu=54[123589]โŽช-mcpu=54[56]lp] [-mfar-modeโŽช-mf]
        [-merrors-to-file <filename>โŽช-me <filename>]

       Target Xtensa options:
        [--[no-]text-section-literals] [--[no-]absolute-literals]
        [--[no-]target-align] [--[no-]longcalls]
        [--[no-]transform]
        [--rename-section oldname=newname]

๐Ÿฆ‹ DESCRIPTION ๐Ÿฆ‹

GNU as is not just one assembler, bestie โ€” she's a whole family of assemblers. If you've used the GNU assembler on one architecture, you should find a fairly similar environment when you use it on another architecture. It's giving consistency. ๐Ÿ’…

Each version has so much in common with the others: object file formats, most assembler directives (often called pseudo-ops), and assembler syntax. Like, the shared DNA is real.

as is primarily intended to assemble the output of the GNU C compiler gcc for use by the linker ld. Nevertheless, we've tried to make as assemble correctly everything that other assemblers for the same machine would assemble. Any exceptions are documented explicitly. That does not mean as always uses the same syntax as another assembler for the same architecture; for example, we know of several incompatible versions of 680x0 assembly language syntax. So don't come for her, okay? ๐Ÿ˜ญ

Each time you run as, it assembles exactly one source program. The source program is made up of one or more files. (The standard input is also a file, bestie.)

You give as a command line that has zero or more input file names. The input files are read from left file name to right. A command line argument (in any position) that has no special meaning is taken to be an input file name.

If you give as no file names, it attempts to read one input file from the as standard input, which is normally your terminal. You may have to type ctl-D to tell as there is no more program to assemble.

Use -- if you need to explicitly name the standard input file in your command line.

If the source is empty, as produces a small, empty object file. Tiny. Minimalist. ๐ŸŽ€

as may write warnings and error messages to the standard error file (usually your terminal). This should not happen when a compiler runs as automatically. Warnings report an assumption made so that as could keep assembling a flawed program; errors report a grave problem that stops the assembly. So warnings are like "hmm, I'm assuming this, keep going?" and errors are like "nope, we're done, this is grave." ๐Ÿ’€

If you're invoking as via the GNU C compiler, you can use the -Wa option to pass arguments through to the assembler. The assembler arguments must be separated from each other (and the -Wa) by commas. For example:

gcc -c -g -O -Wa,-alh,-L file.c

This passes two options to the assembler: -alh (emit a listing to standard output with high-level and assembly source) and -L (retain local symbols in the symbol table).

Usually you do not need to use this -Wa mechanism, since many compiler command-line options are automatically passed to the assembler by the compiler. (You can call the GNU compiler driver with the -v option to see precisely what options it passes to each compilation pass, including the assembler.) Like, the compiler already handles the group chat. You don't always gotta DM the assembler directly. โœจ

๐Ÿ‘‘ OPTIONS ๐Ÿ‘‘

okay bestie, here's the full menu. Every flag, every option, no skips. ๐Ÿ’–

  • -a[cdhlmns] โ€” Turn on listings, in any of a variety of ways. It's giving "show me the receipts" energy. The sub-vibes:
    • -ac โ€” omit false conditionals
    • -ad โ€” omit debugging directives
    • -ah โ€” include high-level source
    • -al โ€” include assembly
    • -am โ€” include macro expansions
    • -an โ€” omit forms processing
    • -as โ€” include symbols
    • =file โ€” set the name of the listing file

You may combine these options; for example, use -aln for assembly listing without forms processing. The =file option, if used, must be the last one. By itself, -a defaults to -ahls. So -a alone is like "give me the high-level, assembly, and symbols, bestie." ๐Ÿ’…

  • --alternate โ€” Begin in alternate macro mode, see @ref{Altmacro,,".altmacro"}.
  • -D โ€” Ignored. This option is accepted for script compatibility with calls to other assemblers. She's just here for the vibes and compatibility. ๐Ÿซถ
  • --defsym sym=value โ€” Define the symbol sym to be value before assembling the input file. value must be an integer constant. As in C, a leading 0x indicates a hexadecimal value, and a leading 0 indicates an octal value.
  • -f โ€” "fast"---skip whitespace and comment preprocessing (assume source is compiler output). Zoom zoom. ๐ŸŽ๏ธ
  • -g, --gen-debug โ€” Generate debugging information for each assembler source line using whichever debug format is preferred by the target. This currently means either STABS, ECOFF or DWARF2.
  • --gstabs โ€” Generate stabs debugging information for each assembler line. This may help debugging assembler code, if the debugger can handle it.
  • --gstabs+ โ€” Generate stabs debugging information for each assembler line, with GNU extensions that probably only gdb can handle, and that could make other debuggers crash or refuse to read your program. This may help debugging assembler code. Currently the only GNU extension is the location of the current working directory at assembling time.
  • --gdwarf-2 โ€” 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. So check your target first, bestie. ๐Ÿ™ˆ
  • --help โ€” Print a summary of the command line options and exit.
  • --target-help โ€” Print a summary of all target specific options and exit.
  • -I dir โ€” Add directory dir to the search list for .include directives.
  • -J โ€” Don't warn about signed overflow.
  • -K โ€” Issue warnings when difference tables altered for long displacements.
  • -L, --keep-locals โ€” Keep (in the symbol table) local symbols. On traditional a.out systems these start with L, but different systems have different local label prefixes.
  • --listing-lhs-width=number โ€” Set the maximum width, in words, of the output data column for an assembler listing to number.
  • --listing-lhs-width2=number โ€” Set the maximum width, in words, of the output data column for continuation lines in an assembler listing to number.
  • --listing-rhs-width=number โ€” Set the maximum width of an input source line, as displayed in a listing, to number bytes.
  • --listing-cont-lines=number โ€” Set the maximum number of lines printed in a listing for a single line of input to number + 1.
  • -o objfile โ€” Name the object-file output from as objfile.
  • -R โ€” Fold the data section into the text section.
  • --statistics โ€” Print the maximum space (in bytes) and total time (in seconds) used by assembly.
  • --strip-local-absolute โ€” Remove local absolute symbols from the outgoing symbol table.
  • -v, -version โ€” Print the as version.
  • --version โ€” Print the as version and exit.
  • -W, --no-warn โ€” Suppress warning messages.
  • --fatal-warnings โ€” Treat warnings as errors.
  • --warn โ€” Don't suppress warning messages or treat them as errors.
  • -w โ€” Ignored. ๐Ÿ’…
  • -x โ€” Ignored. ๐Ÿ™ˆ
  • -Z โ€” Generate an object file even after errors. โœจ
  • -- โŽช files ... โ€” Standard input, or source files to assemble. ๐Ÿ“

ARC processor ๐Ÿฆ‹

The following options are available when as is configured for an ARC processor.

  • -marc[5โŽช6โŽช7โŽช8] โ€” This option selects the core processor variant. ๐Ÿ”ฅ
  • -EB โŽช -EL โ€” Select either big-endian (-EB) or little-endian (-EL) output. ๐ŸŒˆ

ARM processor family ๐Ÿ’ช

The following options are available when as is configured for the ARM processor family.

  • -mcpu=processor[+extension...] โ€” Specify which ARM processor variant is the target. ๐ŸŽฏ
  • -march=architecture[+extension...] โ€” Specify which ARM architecture variant is used by the target. ๐Ÿ—๏ธ
  • -mfpu=floating-point-format โ€” Select which Floating Point architecture is the target. ๐Ÿงฎ
  • -mfloat-abi=abi โ€” Select which floating point ABI is in use. ๐Ÿ“œ
  • -mthumb โ€” Enable Thumb only instruction decoding. ๐Ÿ‘
  • -mapcs-32 โŽช -mapcs-26 โŽช -mapcs-float โŽช -mapcs-reentrant โ€” Select which procedure calling convention is in use. ๐Ÿ“ž
  • -EB โŽช -EL โ€” Select either big-endian (-EB) or little-endian (-EL) output. ๐ŸŒˆ
  • -mthumb-interwork โ€” Specify that the code has been generated with interworking between Thumb and ARM code in mind. ๐Ÿ”„
  • -k โ€” Specify that PIC code has been generated. ๐Ÿ–ผ๏ธ

See the info pages for documentation of the CRIS-specific options. ๐Ÿ“–

D10V processor ๐Ÿค–

The following options are available when as is configured for a D10V processor.

  • -O โ€” Optimize output by parallelizing instructions. โšก

D30V processor ๐Ÿš€

The following options are available when as is configured for a D30V processor.

  • -O โ€” Optimize output by parallelizing instructions. โšก
  • -n โ€” Warn when nops are generated. โš ๏ธ
  • -N โ€” Warn when a nop after a 32-bit multiply instruction is generated. ๐Ÿšจ

Intel 80960 processor ๐Ÿ’ป

The following options are available when as is configured for the Intel 80960 processor.

  • -ACA โŽช -ACA_A โŽช -ACB โŽช -ACC โŽช -AKA โŽช -AKB โŽช -AKC โŽช -AMC โ€” Specify which variant of the 960 architecture is the target. ๐ŸŽ›๏ธ
  • -b โ€” Add code to collect statistics about branches taken. ๐Ÿ“Š
  • -no-relax โ€” Do not alter compare-and-branch instructions for long displacements; error if necessary. ๐Ÿ›‘

Ubicom IP2K series ๐Ÿ“ก

The following options are available when as is configured for the Ubicom IP2K series.

  • -mip2022ext โ€” Specifies that the extended IP2022 instructions are allowed. โœ…
  • -mip2022 โ€” Restores the default behaviour, which restricts the permitted instructions to just the basic IP2022 ones. ๐Ÿ”„

Renesas M32R series (formerly Mitsubishi M32R) ๐Ÿข

The following options are available when as is configured for the Renesas M32R (formerly Mitsubishi M32R) series.

  • --m32rx โ€” Specify which processor in the M32R family is the target. The default is normally the M32R, but this option changes it to the M32RX. ๐Ÿ”ง
  • --warn-explicit-parallel-conflicts or --Wp โ€” Produce warning messages when questionable parallel constructs are encountered. โš ๏ธ
  • --no-warn-explicit-parallel-conflicts or --Wnp โ€” Do not produce warning messages when questionable parallel constructs are encountered. ๐Ÿ”‡

Motorola 68000 series ๐Ÿ๏ธ

The following options are available when as is configured for the Motorola 68000 series.

  • -l โ€” Shorten references to undefined symbols, to one word instead of two. โœ‚๏ธ
  • -m68000 โŽช -m68008 โŽช -m68010 โŽช -m68020 โŽช -m68030 โŽช -m68040 โŽช -m68060 โŽช -m68302 โŽช -m68331 โŽช -m68332 โŽช -m68333 โŽช -m68340 โŽช -mcpu32 โŽช -m5200 โ€” Specify what processor in the 68000 family is the target. The default is normally the 68020, but this can be changed at configuration time. โš™๏ธ
  • -m68881 โŽช -m68882 โŽช -mno-68881 โŽช -mno-68882 โ€” The target machine does (or does not) have a floating-point coprocessor. The default is to assume a coprocessor for 68020, 68030, and cpu32. Although the basic 68000 is not compatible with the 68881, a combination of the two can be specified, since it's possible to do emulation of the coprocessor instructions with the main processor. ๐Ÿงฎ
  • -m68851 โŽช -mno-68851 โ€” The target machine does (or does not) have a memory-management unit coprocessor. The default is to assume an MMU for 68020 and up. ๐Ÿง 

For details about the PDP-11 machine dependent features options, see @ref{PDP-11-Options}. ๐Ÿ“œ

  • -mpic โŽช -mno-pic โ€” Generate position-independent (or position-dependent) code. The default is -mpic. ๐Ÿ–ผ๏ธ
  • -mall
  • -mall-extensions โ€” Enable all instruction set extensions. This is the default. โœ…
  • -mno-extensions โ€” Disable all instruction set extensions. โŒ
  • -mextension โŽช -mno-extension โ€” Enable (or disable) a particular instruction set extension. ๐Ÿ”ง
  • -mcpu โ€” Enable the instruction set extensions supported by a particular CPU, and disable all other extensions. ๐Ÿ–ฅ๏ธ
  • -mmachine โ€” Enable the instruction set extensions supported by a particular machine model, and disable all other extensions. ๐Ÿญ

picoJava processor โ˜•

The following options are available when as is configured for a picoJava processor.

  • -mb โ€” Generate ``big endian'' format output. ๐ŸŒ
  • -ml โ€” Generate ``little endian'' format output. ๐ŸŒŽ

Motorola 68HC11 or 68HC12 series ๐Ÿš—

The following options are available when as is configured for the Motorola 68HC11 or 68HC12 series.

  • -m68hc11 โŽช -m68hc12 โŽช -m68hcs12 โ€” Specify what processor is the target. The default is defined by the configuration option when building the assembler. ๐ŸŽฏ
  • -mshort โ€” Specify to use the 16-bit integer ABI. ๐Ÿ”ข
  • -mlong โ€” Specify to use the 32-bit integer ABI. ๐Ÿ”ข
  • -mshort-double โ€” Specify to use the 32-bit double ABI. ๐Ÿ”ข
  • -mlong-double โ€” Specify to use the 64-bit double ABI. ๐Ÿ”ข
  • --force-long-branchs โ€” Relative branches are turned into absolute ones. This concerns conditional branches, unconditional branches and branches to a sub routine. ๐Ÿ”€
  • -S โŽช --short-branchs โ€” Do not turn relative branchs into absolute ones when the offset is out of range. ๐Ÿ›‘
  • --strict-direct-mode โ€” Do not turn the direct addressing mode into extended addressing mode when the instruction does not support direct addressing mode. ๐Ÿšง
  • --print-insn-syntax โ€” Print the syntax of instruction in case of error. ๐Ÿ–จ๏ธ
  • --print-opcodes โ€” print the list of instructions with syntax and then exit. ๐Ÿ“œ
  • --generate-example โ€” print an example of instruction for each possible instruction and then exit. This option is only useful for testing as. ๐Ÿงช

SPARC architecture ๐ŸŒž

The following options are available when as is configured for the SPARC architecture:

  • -Av6 โŽช -Av7 โŽช -Av8 โŽช -Asparclet โŽช -Asparclite
  • -Av8plus โŽช -Av8plusa โŽช -Av9 โŽช -Av9a โ€” Explicitly select a variant of the SPARC architecture.
    • -Av8plus and -Av8plusa select a 32 bit environment. -Av9 and -Av9a select a 64 bit environment.
    • -Av8plusa and -Av9a enable the SPARC V9 instruction set with UltraSPARC extensions. โœจ
  • -xarch=v8plus โŽช -xarch=v8plusa โ€” For compatibility with the Solaris v9 assembler. These options are equivalent to -Av8plus and -Av8plusa, respectively. ๐Ÿ”„
  • -bump โ€” Warn when the assembler switches to another architecture. โš ๏ธ

'c54x architecture ๐ŸŽ›๏ธ

The following options are available when as is configured for the 'c54x architecture.

  • -mfar-mode โ€” Enable extended addressing mode. All addresses and relocations will assume extended addressing (usually 23 bits). ๐Ÿ“
  • -mcpu=CPU_VERSION โ€” Sets the CPU version being compiled for. ๐Ÿง 
  • -merrors-to-file FILENAME โ€” Redirect error output to a file, for broken systems which don't support such behaviour in the shell. ๐Ÿ“

MIPS processor ๐Ÿงฉ

The following options are available when as is configured for a MIPS processor.

  • -G num โ€” This option sets the largest size of an object that can be referenced implicitly with the "gp" register. It is only accepted for targets that use ECOFF format, such as a DECstation running Ultrix. The default value is 8. ๐Ÿ”ข
  • -EB โ€” Generate ``big endian'' format output. ๐ŸŒ
  • -EL โ€” Generate ``little endian'' format output. ๐ŸŒŽ
  • -mips1
  • -mips2
  • -mips3
  • -mips4
  • -mips5
  • -mips32
  • -mips32r2
  • -mips64
  • -mips64r2 โ€” Generate code for a particular MIPS Instruction Set Architecture level. -mips1 is an alias for -march=r3000, -mips2 is an alias for -march=r6000, -mips3 is an alias for -march=r4000 and -mips4 is an alias for -march=r8000. -mips5, -mips32, -mips32r2, -mips64, and -mips64r2 correspond to generic MIPS V, MIPS32, MIPS32 Release 2, MIPS64, and MIPS64 Release 2 ISA processors, respectively. ๐Ÿ—๏ธ
  • -march=CPU โ€” Generate code for a particular MIPS cpu. ๐ŸŽฏ
  • -mtune=cpu โ€” Schedule and tune for a particular MIPS cpu. ๐ŸŽต
  • -mfix7000
  • -mno-fix7000 โ€” Cause nops to be inserted if the read of the destination register of an mfhi or mflo instruction occurs in the following two instructions. ๐Ÿ”ง
  • -mdebug
  • -no-mdebug โ€” Cause stabs-style debugging output to go into an ECOFF-style .mdebug section instead of the standard ELF .stabs sections. ๐Ÿž
  • -mpdr
  • -mno-pdr โ€” Control generation of ".pdr" sections. ๐Ÿ“„
  • -mgp32
  • -mfp32 โ€” The register sizes are normally inferred from the ISA and ABI, but these flags force a certain group of registers to be treated as 32 bits wide at all times. -mgp32 controls the size of general-purpose registers and -mfp32 controls the size of floating-point registers. ๐Ÿ“
  • -mips16
  • -no-mips16 โ€” Generate code for the MIPS 16 processor. This is equivalent to putting ".set mips16" at the start of the assembly file. -no-mips16 turns off this option. ๐Ÿ”„
  • -mips3d
  • -no-mips3d โ€” Generate code for the MIPS-3D Application Specific Extension. This tells the assembler to accept MIPS-3D instructions. -no-mips3d turns off this option. ๐ŸŽฎ
  • -mdmx
  • -no-mdmx โ€” Generate code for the MDMX Application Specific Extension. This tells the assembler to accept MDMX instructions. -no-mdmx turns off this option. ๐ŸŽฎ
  • --construct-floats
  • --no-construct-floats โ€” The --no-construct-floats option disables the construction of double width floating point constants by loading the two halves of the value into the two single width floating point registers that make up the double width register. By default --construct-floats is selected, allowing construction of these floating point constants. ๐Ÿงฎ
  • --emulation=name โ€” okay so this one is giving method acting ๐Ÿ’… bestie. It makes as pretend to be configured for a whole different target, in all respects: output format (and that's choosing between ELF and ECOFF only, no third option, periodt), how it handles pseudo-opcodes that might generate debugging info or stash symbol table info, and the default endianness. The configuration names you can plug in are:
mipsecoff
mipself
mipslecoff
mipsbecoff
mipslelf
mipsbelf

The first two โ€” mipsecoff and mipself โ€” do not touch the default endianness from whatever the primary target is; the other four flip the default to little- or big-endian based on the b or l sitting in the name (iykyk ๐Ÿ‘€). And literally no matter what, using -EB or -EL overrides whatever endianness got selected here.

Also bestie, this is currently only supported when the primary target as is configured for is a MIPS ELF or ECOFF target. And on top of that, the primary target โ€” or whatever else you specified with --enable-targets=... at configuration time โ€” has to include support for the other format if you want both to be available. Example: the Irix 5 configuration includes support for both. โœจ

Eventually (future era, not now), this option is gonna support more configurations, with more fine-grained control over how the assembler behaves, and it'll be supported for more processors. manifesting it ๐ŸŒˆ

  • -nocpp โ€” as literally ignores this option. It's just accepted so it plays nice with the native tools. It's there, it's chillin', it does nothing ๐Ÿซถ
  • --trap, --no-trap, --break, --no-break โ€” these four control how we deal with multiplication overflow and division by zero. So --trap or --no-break (they're synonyms, same thing, matching outfits ๐Ÿ’œ) take a trap exception โ€” and heads up, those only work for Instruction Set Architecture level 2 and higher. Meanwhile --break or --no-trap (also synonyms, and yes this is the default) take a break exception.
  • -n โ€” when you use this, as will issue a warning every single time it generates a nop instruction from a macro. Not me getting a warning every time ๐Ÿ˜ญ

The following options are available when as is configured for an MCore processor.

  • -jsri2bsr, -nojsri2bsr โ€” enable or disable the JSRI to BSR transformation. By default this is enabled. If you wanna turn it off, the command line option -nojsri2bsr is your girl ๐Ÿ’…
  • -sifilter, -nosifilter โ€” enable or disable the silicon filter behaviour. By default this is disabled, but the default can be overridden by the -sifilter command line option. โœจ
  • -relax โ€” alter jump instructions for long displacements. Lowkey doing the most so your jumps actually reach ๐Ÿฆ‹
  • -mcpu=[210โŽช340] โ€” select the cpu type on the target hardware. This controls which instructions can be assembled. Pick your fighter ๐Ÿ‘‘
  • -EB โ€” assemble for a big endian target.
  • -EL โ€” assemble for a little endian target.

See the info pages for documentation of the MMIX-specific options. (Yes, they're over there, go look ๐ŸŽ€)


The following options are available when as is configured for an Xtensa processor.

  • --text-section-literals โŽช --no-text-section-literals โ€” with --text-section-literals, literal pools are interspersed in the text section. The default is --no-text-section-literals, which places literals in a separate section in the output file. And just so we're clear: these options only affect literals referenced via PC-relative L32R instructions โ€” literals for absolute mode L32R instructions are handled separately. Different lane, different vibe ๐Ÿš—
  • --absolute-literals โŽช --no-absolute-literals โ€” tells the assembler whether L32R instructions use absolute or PC-relative addressing. The default is to assume absolute addressing if the Xtensa processor includes the absolute L32R addressing option. Otherwise? Only the PC-relative L32R mode can be used. No other options, bestie ๐Ÿ™ˆ
  • --target-align โŽช --no-target-align โ€” enable or disable automatic alignment to reduce branch penalties, at the expense of some code density. The default is --target-align. Trade-offs are real ๐Ÿ’€
  • --longcalls โŽช --no-longcalls โ€” enable or disable transformation of call instructions so calls can reach across a greater range of addresses. The default is --no-longcalls.
  • --transform โŽช --no-transform โ€” enable or disable all assembler transformations of Xtensa instructions. The default is --transform.
--no-transform should be used only in the rare cases when the instructions must be exactly as specified in the assembly source. Like, exactly exactly. Do not casually reach for this one ๐Ÿšจ

๐Ÿ‘€ SEE ALSO ๐Ÿ‘€

gcc(1), ld(1), and the Info entries for binutils and ld.


Copyright (C) 1991, 92, 93, 94, 95, 96, 97, 98, 99, 2000, 2001, 2002 Free Software Foundation, Inc.

Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.1 or any later version published by the Free Software Foundation; with no Invariant Sections, with no Front-Cover Texts, and with no Back-Cover Texts. A copy of the license is included in the section entitled ``GNU Free Documentation License''.


And that's a wrap on the whole page, bestie ๐ŸŽ€โœจ This lil masterpiece is from binutils-2.16.1, dated 2005-06-12, and it lives in section AS(1). Go assemble something iconic ๐Ÿ’…๐Ÿ‘‘

๐Ÿ“ฆ where this page comes from