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

Table Of Contents
Native Migration Overview
Open System Services Porting Guide520573-006
10-2
Native Environment Features
HP supports development tools for native mode programs. These tools differ from
those used to develop TNS programs, and are available in the OSS environment as
well as some workstation environments. User libraries, SRLs, and DLLs are supported
in TNS/R native mode. TNS/E native mode supports DLLs and user libraries (actually a
DLL), but not SRLs. To work with the c89 utility, several tools are provided for building
and analyzing native programs: The TNS/R environment provides two native linkers
(ld for position-independent code [PIC] files, nld for non-PIC files) and a native object
file tool (noft); the TNS/E environment provides a native linker (eld) and a native
object file tool (enoft).
Some restrictions exist for the native mode environments. There is limited support for
mixed-language programming: only C, C++, and pTAL are supported. You cannot mix
TNS interpreted, TNS accelerated, or native object files in one program file. Embedded
SQL, which is supported in TAL and C, is not supported in pTAL. No embedded SQL
can be included in a user library, which is a dynamic-link library (for PIC programs) or a
shared run-time library (for non-PIC programs).
A TNS/R native C and C++ migration tool aids the programmer in migrating an
application from a TNS environment to a TNS/R native environment. This tool is
discussed in the TNS/R Native Application Migration Guide. The TNS/E environment
does not provide such a tool, but once a TNS program has been migrated to TNS/R
native mode, few or no changes are needed to then migrate the TNS/R native program
to the TNS/E native environment. Usually, the only required action is to recompile the
program using a TNS/E native compiler. Migrating a TNS program directly to TNS/E
native mode is very similar to migrating it to TNS/R native mode in terms of the source
code changes required.
In planning the migration of your programs to a native environment, you should focus
on programs that have the following qualities:
Spend a significant amount of time in user code, not system code
Are critical to application performance
Are processor-intensive and not I/O bound
In the G-series OSS and Guardian environments, and in the H-series Guardian
environment, the decision to migrate to native mode is similar to the decision to use the
G-series Accelerator or H-series Object Code Accelerator for TNS programs.
On H-series systems, the Guardian environment supports execution of TNS interpreted
or accelerated programs, but the OSS environment does not. Therefore, if you are
migrating a G-series OSS TNS program to an H-series system, you must migrate the
program to TNS/E native mode.
Native Environment Features
The following subsections discuss the native environment features:
Stack and Heap Sizes on page 10-3
Kernel-Managed Swap Facility (KMSF) on page 10-3
Native Shared Run-Time Libraries on page 10-3