None.
Minimizes the number of static constructors included from libraries and object files.
When -qnotwolinkis in effect, all static constructors in .o files and object files are invoked. This generates larger executable files, but ensures that placing a .o file in a library does not change the behavior of a program.
Normally, the compiler links in all static constructors defined anywhere in the object (.o) files and library (.a) files. The -qtwolink option makes link time longer, but linking is compatible with older versions of C or C++ compilers.
-qnotwolink
Before using -qtwolink, make sure that any .o files placed in an archive do not change the behavior of the program.
None.
#include <stdio.h> struct foo { foo() {printf (“in foo\n”);} ~foo() {printf (“in ~foo\n”);} };and the C++ program t.C:
#include “foo.h” foo bar;and the program t2.C:
#include “foo.h” main() { }
xlc++ -c t.C t2.Cand then link them to produce the executable file a.out:
xlc++ t.o t2.o
in foo in ~foo
ar rv t.a t.oand then use the default compiler command:
xlc++ t2.o t.athe output from the executable file is the same as above:
in foo in ~foo
xlc++ -qtwolink t2.o t.athere is no output from the executable file a.out because the static constructor foo() in t.C is not found.