Go to main content

Oracle® Developer Studio 12.6: Distribution Readme

Exit Print View

Updated: June 2018
 
 

4. Link-time Executables

The following executable is redistributable with object files and libraries that clients link into programs:

  • postopt for Oracle Solaris on the SPARC Platform

postopt is a link-time optimizer that uses profile information (-xprofile=use) to optimize .o files and archive libraries into binary executables or shared (dynamic) libraries.

You would need to ship the postopt executable with your product only when all of these conditions are met:

  • You supply libraries and .o files to be linked into a program by your clients, and

  • Your clients are not expected to have Oracle Developer Studio, and

  • You normally provide a script or makefile that does the linking using ld directly instead of using cc|CC|f90, and

  • You expect your clients to see runtime performance improvements when postopt's link-time optimizations are enabled, and

  • You HAVE compiled all or some libraries and .o files with the —xlinkopt option, and

  • You did NOT compile with option —xF, which causes code to be fragmented into multiple sections.

ISVs who perform linking at their client site normally provide a script or makefile which uses the Oracle Solaris ld as follows:

% /usr/ccs/bin/ld /isv_install_area/crti.o ...
<linker_options_.o_files_and_libraries> ... /isv_install_area/crtn.o

When using postopt, the user just needs to modify the command to replace ld with postopt, as follows:

% /isv_install_area/postopt /isv_install_area/crti.o ...
<linker_options_.o_files_and_libraries> ... /isv_install_area/crtn.o

postopt automatically calls the Oracle Solaris ld after its optimizations are complete to create the final binary executable or shared library.