TNS/E Native Application Conversion Guide

Introduction to Native Mode
TNS/E Native Application Conversion Guide529659-003
1-16
Native Object File Format
For native C and C++ programs, the native Common Run-Time Environment (CRE)
automatically manages a heap in the globals-heap segment. The heap is optional for
other programs.
TNS and Itanium stack growth is as follows:
TNS stacks grow upwards (from lower to higher addresses).
The Itanium RSE backing store grows upwards.
Itanium memory stacks grow downwards.
On TNS/E processors, the main memory stack and the heap grow automatically as
needed, to a maximum size. The maximum size of each can be specified when a
process is created. The default limit for the TNS/E main memory stack is 2 MB. You
can increase the maximum stack size via an eld or PROCESS_LAUNCH_ parameter
up to a limit of 32 MB.
The heap can grow to the maximum size of the globals-heap segment less the size of
the global data. The maximum globals-heap size is 1.5 GB.
See the
Guardian Programmer’s Guide
for more information on TNS/E native
processes.
Native Object File Format
Native object files use a different file format from that of TNS interpreted or accelerated
object files. Native object files are in 64-bit executable and linking format (ELF), a
standard format used for UNIX object files, with HP extensions for NonStop systems.
The native object file format is the same in the Guardian and OSS environments and
on the PC as part of ETK. In the Guardian environment, native object files are type 800
files.
Native object files are either relinkable or executable, but not both. (TNS interpreted
and accelerated object files, by contrast, can be both relinkable and executable.) As
the name implies, a relinkable object file can be linked to produce an executable object
file, but it cannot be run. Likewise, an executable object file can be run, but it cannot be
linked to produce another executable object file.
The native compilers produce only relinkable object files. The eld utility can produce
either relinkable or executable object files. Relinkable object files can be used as eld
input again. Executable object files can be used as eld input for modifying executable
object file attributes only. Both relinkable and executable object files can be used as
noft input.
For details on the structure of native object files, see the
eld Manual
.