-qfuncsect

Purpose

Places instructions for each function in a separate section. Placing each function in its own section might reduce the size of your program because the linker can collect garbage per function rather than per object file.

When -qnofuncsect is in effect, each object file consists of a single text section combining all functions defined in the corresponding source file. You can use -qfuncsect to place each function in a separate section.

Syntax

Read syntax diagramSkip visual syntax diagram
        .-nofuncsect-.   
>>- -q--+-funcsect---+-----------------------------------------><

Defaults

-qnofuncsect

Usage

Using multiple sections increases the size of the object file, but it can reduce the size of the final executable by allowing the linker to remove functions that are not called or that have been inlined by the optimizer at all places they are called.

The pragma directive must be specified before the first statement in the compilation unit.

Predefined macros

None.



Voice your opinion on getting help information Ask IBM compiler experts a technical question in the IBM XL compilers forum Reach out to us