S

Option Type Default Value #pragma options C C++
-flag - - x x

Syntax

    -S 

Purpose
Generates an assembler language file (.s) for each source file. The resulting .s files can be assembled to produce object .o files or an executable file (a.out).

Notes
You can invoke the assembler with the xlC command. For example,

xlC myprogram.s

will invoke the assembler, and if successful, the loader to create an executable file, a.out.

If you specify -S with -E or -P, -E or -P takes precedence. Order of precedence holds regardless of the order in which they were specified on the command line.

You can use the -o option to specify the name of the file produced only if no more than one source file is supplied. For example, the following is not valid:

xlC myprogram1.c myprogram2.c -o -S

Restrictions
The generated assembler files do not include all the data that is included in a .o file by the -g or -qipa options.

Example
To compile myprogram.c to produce an assembler language file myprogram.s, enter:

xlC myprogram.c -S

To assemble this program to produce an object file myprogram.o, enter:

xlC myprogram.s -c

To compile myprogram.c to produce an assembler language file asmprogram.s, enter:

xlC myprogram.c -S -o asmprogram.s


List of Batch Compiler Options and Their Defaults
Equivalent Batch Compile-Link and Incremental Build Options
Resolving Conflicting Compiler Options
AIX Version 4 Assembler Language Reference
AIX Version 4 Files Reference