Specifies that a compilation unit is a component of a main program and should not be linked as part of a shareable object.
None
IA-32, IntelŪ EM64T, IntelŪ ItaniumŪ architecture
Linux: | -fminshared |
Windows: | None |
None
OFF | Source files are compiled together to form a single object file. |
This option specifies that a compilation unit is a component of a main program and should not be linked as part of a shareable object.
Since symbols defined in the main program cannot be preempted, this allows the compiler to treat symbols declared with default visibility as though they have protected visibility (so -fminshared implies -fvisibility=protected).
Also, the compiler need not generate position-independent code for the main program. It can use absolute addressing, which may reduce the size of the global offset table (GOT) and may reduce memory traffic.
None