nld Manual
Sample nld and noft Session
nld Manual—528272-001
A-7
nld Command Examples
nld Command Examples
Example A-9 is a multiline TACL command that runs nld with the options used to
make an executable user library called UTILLIB.
The program UTILLIB is executable, but it does not have a main function. The SRL
libraries ZCRESRL and ZCRTLSRL allow nld to link functions to the correct
addresses in the SRLs. The flag -ul tells nld to use user library address range for the
functions.
Example A-10 is a multiline TACL command that runs nld with the options used to link
the modules of the Example Program on page A-1 and make the program executable
with the name EXAMPLE1.
The command in Example A-10 includes the module CRTLMAIN (C run-time library
main), which C programs need to give the program an executable main function. The
SRL libraries ZCRESRL and ZCRTLSRL enable nld to link function calls to the correct
addresses in the SRLs. The full name of the user library is also included to enable nld
to make the correct address link to the functions.
Example A-9. Linking an Executable User Library
nld utilo &
&-l zcresrl -l zcrtlsrl &
&-o utillib -set inspect on -ul
Example A-10. Linking a Program File
nld module1o module2o maino $system.system.crtlmain &
&-l zcresrl -l zcrtlsrl &
&-o example1 -set inspect on -libname $D0117.CRGMAN.UTILLIB