The linkage editor link-edits specified object files to create one executable file. Invoking the compiler with one of the invocation commands automatically calls the linkage editor unless you specify one of the following compiler options: -E, -P, -c, -S, -qsyntaxonly or -#.
xlc myfile.c -o myfile
If you use the -qmkshrobj option to create a shared library, the shared object created will have a .so filename extension.
You can invoke the linkage editor explicitly with the ld command. However, the compiler invocation commands set several linkage-editor options, and link some standard files into the executable output by default. In most cases, it is better to use one of the compiler invocation commands to link-edit your object files.
Specify Compiler Options
Invoke the Compiler
Compiler Command Line Options
Message Severity Levels and Compiler Response
Appendix C, Libraries in XL C/C++