Open System Services Porting Guide (G06.24+, H06.03+)

Table Of Contents
The Development Environment
Open System Services Porting Guide520573-006
2-3
File Compatibility
File Compatibility
The native processing environments can execute native executable files; TNS/R native
object files execute in the TNS/R native environment, and TNS/E native object files
execute in the TNS/E native environment. The G-series TNS/R native processing
environment can also execute TNS interpreted files and TNS accelerated files in both
the Guardian and OSS environments. In the H-series TNS/E native processing
environment, only the Guardian environment can execute TNS interpreted and
accelerated files; the H-series OSS environment does not support TNS interpreted and
accelerated execution modes.
To reap any performance benefits from executing a TNS executable file on a RISC or
Itanium processor, the file needs to be accelerated. Two accelerator programs are
provided, one to accelerate programs for execution on a TNS/R system and one to
accelerate programs for execution on a TNS/E system. (A TNS/E-accelerated program
can execute only in the H-series Guardian environment, and not in the H-series OSS
environment.) However, native executable files running in a native environment still
perform significantly faster than TNS-accelerated files running on the same system.
The TNS/R and TNS/E native environments support position-independent code (PIC)
files, which enable programmers to create and use dynamic-link libraries (DLLs). By
default, the TNS/R native C compiler creates non-PIC object files; a compiler option
flag is required to create PIC object files. The TNS/E native C compiler creates only
PIC object files; non-PIC files are not supported in the TNS/E native environment.
Native object files (PIC and non-PIC) cannot be linked together with TNS interpreted
object files or with TNS accelerated object files to create an executable file. PIC files
cannot be linked with non-PIC files.
Executable files created by the TNS/R native C compiler can run only on a D40.00 (or
later) TNS/R native system; they cannot run on a TNS system, a TNS/R system earlier
than D40.00, or a TNS/E system. Executable files created by the TNS/E native C
compiler can run only on an H06.01 or later TNS/E native system; they cannot run on a
TNS system or on a TNS/R system.
The native C compilers accept only filenames that are correct for the compilation
environment. For example, when running in the OSS environment, only OSS
pathnames are recognized.
Compilation Options for C and C++ Programs
With the introduction of the native C compilation tools, the OSS programmer has a
greater selection of environments in which to develop and compile C and C++
programs. This subsection describes the TNS/R native, TNS/E native, and G-series
TNS C compilation tools. Compilation steps and options are provided later in this
section.
You can develop TNS/R native programs on either a TNS/R or TNS/E platform. The
H-series RVUs support the TNS/R compilation tools, allowing you to compile and link
TNS/R native programs on a TNS/E native system; however, you must transfer the