Changing The Target Environment; Creating Loadfiles And Linkfiles; Example; Creating A Program For The Guardian Environment (Oss) - HP nld Manual

Table of Contents

Advertisement

nld Utility

Changing the Target Environment

The target environment is the environment in which you intend to run the program file.
By default, the Guardian version of nld builds files intended to run in the Guardian
environment and the OSS version of nld builds files intended to run in the OSS
environment.
To build a program file intended to run in the Guardian environment using the OSS
version of nld, specify:
-set systype guardian
To build a program file intended to run in the OSS environment using the Guardian
versions of nld, specify:
-set systype oss
Note. In some cases, such as when C/C++ programs include stdio.h, setting the target
environment with the -set systype option might result in a program that executes incorrectly
in the specified environment. In such cases, you must specify the systype option on the
compiler command line to ensure the correct code is created.

Example

2-9, in the OSS environment, links the object files names obj6.o and
obj7.o into a program named prog that you intend to run as a Guardian process.
Example 2-9. Creating a Program for the Guardian Environment (OSS)
nld obj6.o obj7.o -o prog -set systype guardian

Creating Loadfiles and Linkfiles

A loadfile cannot be linked to a new object file, it can be used only as input to nld with
options that modify an existing loadfile. A linkfile can be used as nld input again.
nld creates a loadfile if you do not specify the -r flag. If you do specify the -r flag,
nld creates a linkfile.
nld and noft Manual—520384-003
2 -8
Changing the Target Environment

Advertisement

Table of Contents
loading

This manual is also suitable for:

Noft

Table of Contents