
nld Utility
nld and noft Manual — 520384-003
2 -9
Linking Programs
Linking Programs
•
C Programs
on page 2-9
•
C++ Programs
on page 2-10
•
COBOL Programs
on page 2-12
•
pTAL Programs
on page 2-13
•
Mixed-Language Programs
on page 2-13
•
Programs With Embedded NonStop SQL/MP
on page 2-13
C Programs
C programs require access to their run-time environments. To create an executable C
program, you must link to the run-time environment initialization code and the shared
run-time libraries (SRLs) your program uses. The NMC and
c89
compilers
automatically link to the required items. If you use
nld
directly to link a C program, you
must specify these items in
nld
options.
Follow these step to create an executable C program using
nld
:
1. Link together the object code files that you compiled.
2. Link to the C run-time library initialization object code file:
3. Link to the SRLs that your program uses. To link the standard set of C SRLs, use
the following options:
4. If your program uses active backup programming functions, such as
__ns_start_backup()
, link to the active backup programming support object
code file:
Note.
You can only link linkfiles into a program. You cannot link loadfiles, or a combination of
loadfiles and linkfiles, into a program.
Environment
Run-Time Library Initialization Object Code File
Guardian
$SYSTEM.SYSTEM.CRTLMAIN
OSS
/usr/lib/crtlmain.o
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
Summary of Contents for nld
Page 12: ...Contents nld and noft Manual 520384 003 x ...
Page 16: ...What s New in This Manual nld and noft Manual 520384 003 xiv Miscellaneous ...
Page 22: ...About This Manual nld and noft Manual 520384 003 xx Change Bar Notation ...
Page 28: ...Introduction to the Utilities nld and noft Manual 520384 003 1 6 strip ...
Page 60: ...nld Utility nld and noft Manual 520384 003 2 32 Declaration and Definition ...
Page 78: ...nld Options nld and noft Manual 520384 003 3 18 y ...
Page 90: ...noft Utility nld and noft Manual 520384 003 4 12 Debugging With noft ...
Page 150: ...strip Utility nld and noft Manual 520384 003 7 2 ...
Page 242: ...nld Diagnostic Messages nld and noft Manual 520384 003 10 82 Informational Messages ...
Page 278: ...noft Diagnostic Messages nld and noft Manual 520384 003 11 36 Syntax Errors ...
Page 286: ...ar Diagnostic Messages nld and noft Manual 520384 003 12 8 ...
Page 314: ...Sample nld and noft Session nld and noft Manual 520384 003 A 28 LISTSRLFIXUPS ...
Page 330: ...Index nld and noft Manual 520384 003 Index 10 Special Characters ...