-r
Category
Pragma equivalent
None.
Purpose
Produces a nonexecutable output file to use as an input file in another ld command call. This file may also contain unresolved symbols.
Defaults
Not applicable.
Usage
A file produced with this flag is expected to be used as an input file in another compiler invocation or ld command call.
Predefined macros
None.
Examples
To compile myprogram.c and myprog2.c into a single object file mytest.o,
enter:
xlc myprogram.c myprog2.c -r -o mytest.o