JavaScript is required to for searching.
Skip Navigation Links
Exit Print View
x86 Assembly Language Reference Manual     Oracle Solaris 11.1 Information Library
search filter icon
search icon

Document Information

Preface

1.  Overview of the Oracle Solaris x86 Assembler

2.  Oracle Solaris x86 Assembly Language Syntax

3.  Instruction Set Mapping

A.  Using the Assembler Command Line

Assembler Command Line

Assembler Command Line Options

Disassembling Object Code

Index

Assembler Command Line Options

-a32

Allow 32–bit addresses in 64–bit mode.

-Dname -Dname=def

When the -P option is in effect, these options are passed to the cpp preprocessor without interpretation by the as command; otherwise, they are ignored.

-{n}H

Enable (-H) or suppress (-nH) generation of the Hardware Capabilities section.

-Ipath

When the -P option is in effect, this option is passed to the cpp preprocessor without interpretation by the as command; otherwise, it is ignored.

-i

Ignore line number information from the preprocessor.

-KPIC

Check for address referencing with absolute relocation and issue warning.

-m

This option runs m4 macro preprocessing on input. The m4 preprocessor is more useful for complex preprocessing than the C preprocessor invoked by the -P option. See the m4(1) man page for more information about the m4 macro-processor.

-m64|-m32

Select the 64–bit (-m64) or 32–bit (-m32) memory model. With –m64, the resulting .o object files are in 64-bit ELF format and can only be linked with other object files in the same format. The resulting executable can only be run on a 64-bit x86 processor running 64-bit Oracle Solaris OS. –m32 is the default.

-n

Suppress all warnings while assembling.

-o outfile

Write the output of the assember to outfile. By default, if –o is not specified, the output file name is the same as the input file name with .s replaced with .o.

-P

Run cpp(1), the C preprocessor, on the files being assembled. The preprocessor is run separately on each input file, not on their concatenation. The preprocessor output is passed to the assembler.

-Q{y|n}

This option produces the “assembler version” information in the comment section of the output object file if the y option is specified; if the n option is specified, the information is suppressed.

-S[a|b|c|l|A|B|C|L]

Produces a disassembly of the emitted code to the standard output. Adding each of the following characters to the -S option produces:

Capital letters turn the switch off for the corresponding option.

-s

This option places all stabs in the ".stabs" section. By default, stabs are placed in "stabs.excl" sections, which are stripped out by the static linker ld during final execution. When the -s option is used, stabs remain in the final executable because ".stab" sections are not stripped out by the static linker ld.

-Uname

When the -P option is in effect, this option is passed to the cpp preprocessor without interpretation by the as command; otherwise, it is ignored.

-V

This option writes the version information on the standard error output.

-xchip=processor

processor specifies the target architecture processor. When there is a choice between several possible encodings, choose the one that is appropriate for the stated chip. In particular, use the appropriate no-op byte sequence to fill code alignment padding, and warn when instructions not defined for the stated chip are used.

The assembler accepts the instruction sets for the following recognized -xchip processor values:

processor value
Target Processor
generic
Generic x86
native
This host processor.
core2
Intel Core2
nehalem
Intel Nehalem
opteron
AMD Opteron
penryn
Intel Penryn
pentium
Intel Pentium
pentium_pro
Intel Pentium Pro
pentium3
Intel Pentium 3.
pentium4
Intel Pentium 4
sandybridge
Intel Sandy Bridge
westmere
Intel Westmere
amdfam10
AMD FAM10
ivybridge
Intel Ivy Bridge
haswell
Intel Hawell

-xmodel=[small | medium | kernel]

For -m64 only, generate R_X86_64_32S relocatable type for data access under kernel. Otherwise, generate R_X86_64_32 under small. SHN_AMD64_LCOMMON and .lbcomm support added under medium. The default is small.

-Y{d|m},path

Specify the path to locate the version of cm4defs (-Yd,path) or m4 (-Ym,path) to use.

-YI,path

Indicate path to search for #include header files.