Sun Studio 12 Update 1: C++ User's Guide

A.2.112 -xbinopt={prepare|off}

(SPARC) Instructs the compiler to prepare the binary for later optimizations, transformations and analysis, see binopt(1). This option may be used for building executables or shared objects. If you compile in separate steps, -xbinopt must appear on both compile and link steps:


example% cc -c -xO1 -xbinopt=prepare a.c b.c
example% cc -o myprog -xbinopt=prepare a.o

If some source code is not available for compilation, this option may still be used to compile the remainder of the code. It should then be used in the link step that creates the final binary. In such a situation, only the code compiled with this option can be optimized, transformed or analyzed.

A.2.112.1 Defaults

The default is -xbinopt=off.

Interactions

This option must be used with optimization level -xO1 or higher to be effective. There is a modest increase in size of the binary when built with this option.

Compiling with -xbinopt=prepare and -g increases the size of the executable by including debugging information.