-qminimaltoc

Category

Optimization and tuning

Pragma equivalent

None.

Purpose

Controls the generation of the table of contents (TOC), which the compiler creates for an executable file.

Programs compiled in 64-bit mode have a limit of 8192 TOC entries. As a result, you may encounter "relocation truncation" error messages when linking large programs in 64-bit mode; these error messages are caused by TOC overflow conditions. When -qminimaltoc is in effect, the compiler avoids these overflow conditions by placing TOC entries into a separate data section for each object file.

Specifying -qminimaltoc ensures that the compiler creates only one TOC entry for each compilation unit. Specifying this option can minimize the use of available TOC entries, but its use impacts performance. Use the -qminimaltoc option with discretion, particularly with files that contain frequently executed code.

Syntax

Read syntax diagramSkip visual syntax diagram
        .-nominimaltoc-.   
>>- -q--+-minimaltoc---+---------------------------------------><

Defaults

-qnominimaltoc

Usage

Compiling with -qminimaltoc may create slightly slower and larger code for your program. However, these effects may be minimized by specifying optimizing options when compiling your program.

Predefined macros

None.