C/C++ Programmer's Guide (G06.27+, H06.08+, J06.03+)

NON_SHARED
The NON_SHARED pragma directs the native C and C++ compilers to generate non-shared code
(that is, not PIC (Position-Independent Code).
Compare the action of NON_SHARED with that of the two related pragmas:
CALL_SHARED directs the compiler to generate PIC.
SHARED directs the compiler to generate PIC and to invoke the ld linker to create a PIC library
file.
NON_SHARED
The pragma default settings are:
SYSTYPE OSSSYSTYPE GUARDIAN
N.A.N.A.TNS C compiler
N.A.N.A.G-series TNS c89 utility
NON_SHAREDNON_SHAREDTNS/R native C and C++ compilers
TNS/R code: NON_SHARED TNS/E
code: N.A.
TNS/R code: NON_SHARED TNS/E
code: N.A.
Native c89 utility
N.A.N.A.c99 utility
N.A.N.A.TNS/E native C and C++ compilers
Usage Guidelines
On Guardian environment, the NON_SHARED pragma can appear only on the RUN command
line for NMC or NMCPLUS. On OSS environment, the -Wnon_shared option can appear
only on the RUN command line for the c89 utility when the nld utility is used.
On TNS/R Guardian environment, the default behavior of NON_SHARED is to not call the ld
linker. The TNS/R native C or C++ driver only calls the linker if you also specify either
RUNNABLE or LINKFILE, or if you specify SHARED.
If you specify NON_SHARED, the compilation results in a non-PIC linkable object file (a
linkfile).
If you include both the NON_SHARED and RUNNABLE pragmas, the compilation results
in a non-PIC executable object file (a loadfile) from the nld linker.
On TNS/R OSS, the default behavior of the -non_shared option is to automatically call the
nld linker.
If you specify -Wnon_shared, the compilation results in a non-PIC executable object file
(loadfile).
If you specify the -c option with -Wnon_shared, the linker is not called, and the result
is a non-PIC linkable object file (linkfile).
OLDCALLS
The OLDCALLS pragma controls how the TNS C compiler generates code for function calls.
[NO]OLDCALLS
222 Compiler Pragmas