Linking

Though linking occurs automatically, the options in this category allow you to direct input and output to the linker, controlling how the linker processes your object files.
Table 1. Linking options
Option name Equivalent pragma name Description
-b None.

Controls how shared objects are processed by the linker.

-bmaxdata None.

Sets the maximum size of the area shared by the static data (both initialized and uninitialized) and the heap.

-brtl None.

Controls runtime linking for the output file.

-qcrt None.

Specifies whether system startup files are to be linked.

-e None.

When used together with the -qmkshrobj or -G option, specifies an entry point for a shared object.

-f None.

Names a file that stores a list of object files for the compiler to pass to the linker.

-L None.

Searches the directory path for library files specified by the -l option.

-l None.

Searches for the specified library file, libkey.so, and then libkey.a for dynamic linking, or just for libkey.a for static linking.

-qlib None.

Specifies whether standard system libraries and XL C/C++ libraries are to be linked.

-qtwolink (C++ only) None.

Minimizes the number of static constructors included from libraries and object files.

-Z None.

Specifies a prefix for the library search path to be used by the linker.