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

Usage Guidelines
The ELD pragma is a command-line directive and must not be entered in the source text.
On Guardian environment, the ELD pragma must be entered on the compiler RUN command
line for TNS/E native C/C++. On OSS environment, specify the ELD pragma by using the
-Weld=arg flag for the c89 or the c99 utility.
The ELD pragma does not actually invoke the eld linker. To invoke eld, you must include
other pragmas such as RUNNABLE, SHARED or LINKFILE. If eld is not invoked, this pragma
is ignored.
This TNS/E native C command example shows the ELD pragma. Note that if you specify
SHARED, no need to include RUNNABLE:
ccomp /in prog1/ prog1o; runnable, eld(-set floattype neutral)
ENV
The ENV pragma specifies the intended run-time environment of an object file.
ENV env-option
env-option:
{ COMMON }
{ EMBEDDED }
{ LIBRARY }
{ LIBSPACE }
COMMON
specifies that the module requires the Common Run-Time Environment (CRE).
The module can be called by routines written in any language that runs in the CRE. Use this
option for user code functions that run in the CRE.
For the native C and C++ compilers, this option sets the _COMMON feature-test macro.
EMBEDDED
specifies that the module does not require resources provided by the CRE and that it meets the
requirements to run in the system code space.
The module can be called from routines written in any language, regardless of whether the
routines run in the CRE. Use this option for user code functions that do not rely on run-time
libraries. It is intended for system-level programming. For additional considerations, see
Chapter 9: System-Level Programming.
You must verify that code does not use the C run-time library and other CRE resources. The
compiler performs no verification. Specifying ENV EMBEDDED does not make code that uses
the C run-time library and other CRE resources able to run in the system code space.
For the native C and C++ compilers, this option sets the _EMBEDDED feature-test macro.
LIBRARY
specifies that the module requires the CRE and that the module meets the requirements to run
in the user library space.
The module can be called by routines written only in C or C++. Use this option for TNS user
library functions. Do not use this option for native user library functions.
TNS user library programs can call a very limited number of C run-time library functions.
Specifically, TNS user library programs cannot call functions that require relocatable data
blocks (global data). Native user library programs can call the entire C run-time library.
For the native C and C++ compilers, this option sets the _LIBRARY feature-test macro.
ENV 183