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.

Sets special linker processing options. This option can be repeated.

-bmaxdata None.

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

-brtl None.

Enables runtime linking for the output file. When you use -brtl with the -l option, the linker searches for a library with the suffix of .so, as well as of .a. Preference is given to .so over .a when libraries with the same name are present in the same directory.

-qcrt None.

Specifies whether system startup files are to be linked.

-e None.

When used together with the -qmkshrobj option 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. For static and dynamic linking, the linker searches for libkey.a. For runtime linking with the -brtl option, the linker searches for libkey.so, and then libkey.a if libkey.so is not found.

-qlib None.

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

-Z None.

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



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