DLL Programmer's Guide for TNS/R Systems
Advanced DLL Facility Controls
DLL Programmer’s Guide for TNS/R Systems—522203-002
5-8
Using the Linker to Change an Existing Loadfile
Using the Linker to Change an Existing
Loadfile
The options described in this subsection act on existing loadfiles, rather than a file
being linked. In the following options, loadfileName is the name of the target
loadfile.
Changing the Attributes of an Existing Loadfile
To alter any attribute of an existing loadfile, invoke the linker and insert the
-change attribute value loadfileName option. The attribute and value
choices are the same as for -set, as described in How to Set Run-Time Attributes of
Your Loadfile on page 5-5. The -change option overwrites the attribute in the
existing loadfile. You must be able to open the existing loadfile for update. If an error
occurs in -change processing, the specified change may or may not have occurred
and the file will be otherwise unmodified.
You can insert multiple -change options, where each must be followed by the name
of the affected loadfile, even if the loadfile is the same in each case. These options are
executed one at a time in the order inserted.
Your user ID must have write access to the file to execute the -change option on it.
Link-Time Operation
Running the Linker Through the Compiler
The C and C++ compilers can run the linker for you, saving you a separate step in
straightforward situations. In each case, the compiler automatically names many of the
appropriate files input and library files in the linker command stream. These are:
•
The usual C libraries (listed in LIBCOBEY or libc.obey), always.
•
The usual C++ runtime libraries and cppinit module for the selected dialect version,
for C++.
•
CCPPMAIN or ccppmain.o, when building a PIC program.
The compiler does not automatically include more specialized libraries, such as those
for tools.h++, or the loader library (ZRLDSRL).
Guardian
NMC and NMCPLUS will run the linker when building a program, if you add the
RUNNABLE pragma to the command line. For example:
nmc /in myprogc/ myprog; suppress,runnable,call_shared,symbols