ld Manual

Introduction to ld
ld Manual529650.001
1-8
Changing the Target Environment
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 ld builds files intended to run in the Guardian
environment. The OSS version of ld 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 ld, specify:
-set systype guardian
To build a program file intended to run in the OSS environment using the Guardian
versions of ld, specify:
-set systype oss
Example 1-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.
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 1-9. Creating a Program for the Guardian Environment (OSS)
ld obj6.o obj7.o -o prog -set systype guardian