This chapter describes how to invoke the assembler and use the command-line options.
This chapter is organized as follows:
as [options] [inputfile] ...
The as command translates the assembly language source files, inputfile, into an executable object file, objfile. The Intel assembler recognizes the file name argument hyphen (-) as the standard input. It accepts more than one file name on the command line. The input file is the concatenation of all the specified files. If an invalid option is given or the command line contains a syntax error, the Intel assembler prints the error (including a synopsis of the command line syntax and options) to standard error output, and then terminates.
The Intel assembler supports #define macros, #include files, and symbolic substitution through use of the C preprocessor cpp. The assembler invokes the preprocessor before assembly begins if it has been specified from the command line as an option. (See the -P option.)
Enable Sun SourceBrowser.
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.
Generate position-independent code.
Save all symbols, including temporary labels that are normally discarded to save space, in the ELF symbol table.
This new option runs m4 macro preprocessing on input. The m4 preprocessor is more powerful than the C preprocessor (invoked by the -P option), so it is more useful for complex preprocessing. See the SunOS 5.x Reference Manual for x86 for a detailed description of the m4 macro-processor.
Takes the next argument as the name of the output file to be produced. By default, the .s suffix, if present, is removed from the input file and the .o suffix is appended to form the output file name.
This new 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.
This new option places all stabs in the .stabs section. By default, stabs are placed in stabs.excl sections, that 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.
Produce a disassembly of the emitted code to the standard output. Adding the character to the S option:
a - disassembling with address
b - disassembling with '.bof'
c - disassembling with comments (default)
l - disassembling with line numbers
Capital letters turn switch off for corresponding option
This is a migration option for 4.1 assembly files to be assembled on 5.0 systems. With this option, the symbol names in 4.1 assembly files will be interpreted as 5.0 symbol names.
Generates additional information for performance analysis of the executable using WorkShop (SPARC-works) analyzer. If the input file does not contain any stabs (debugging directives), then the assembler will generate some default stabs which are needed by the SPARCworks analyzer.