nld Manual

nld Utility
nld Manual528272-001
2-11
COBOL Programs
3. Link to the SRLs that your program uses. To link the standard set of C SRLs, use
these options:
C++ programs require additional SRLs. See Determining Which SRLs Programs
Require on page 2-16.
4. If your program uses active backup programming functions, such as
__ns_start_backup(), link to the active backup programming support object
code file:
For information about active backup programming in C++, see the Guardian
Programmer’s Guide.
5. If you want to overload the new and delete operations, you must link these files
to your program:
COBOL Programs
In the OSS environment, the nmcobol compiler automatically calls nld to link the
compiled program unless the compiler is run with the -c (compile only) directive.
In the Guardian environment, the NMCOBOL compiler automatically calls nld to link
the compiled program only if the compiler is run with the RUNNABLE directive.
When the NMCOBOL compiler automatically calls nld to link the compiled program, it
gives nld:
The compiled programs object file name (either the object file name that you
specified or the default name a.out) as the input file name
The name of the COBOL run-time library, ZCOBSRL
The name of the common run-time environment library, ZCRESRL
Any files located by the SEARCH directive
If you use nld directly to link a COBOL program, you must supply the libraries
ZCOBSRL and ZCRESRL.
Environment Option for Linking the Standard Set of C SRLs
Guardian -OBEY $SYSTEM.SYSTEM.LIBCOBEY
OSS
-obey /usr/lib/libc.obey
Environment Active Backup Programming Support Object Code File
Guardian $SYSTEM.SYSTEM.CRTLNS
OSS /usr/lib/crtlns.o
Environment Active Backup Programming Support Object Code File
Guardian $SYSTEM.SYSTEM.CPPINIT
OSS /usr/lib/cppinit.o