eld Input and Output
eld Manual—527255-009
2-6
Creating Segments of the Output Loadfile
the name of the work file is unchanged and the linker puts out a warning message.
Similarly, if the
-temp_o
option is not specified then the name of the work file is
unchanged.
Thus, the
-temp_o
option gives the user a way to specify the name of a file that will
only come into existence if the link is successful and will still be in existence if
something goes wrong when the linker tries to put the file in the designated output file
location.
Next, if there already was a file with the name of the output object file, the linker will try
to remove that file. If the linker cannot remove it, the linker will put out a warning
message saying that the output file of the link is in the location of the work file (possibly
renamed by
-temp_o
). If there was no file with the same name as the output file, or if
the linker was successful in removing that file, the work file is renamed to the output file
name.
The name of the output object file can be the same as the name of an input file. That
input file would therefore be removed if the link was successful.
It is possible that the linker might terminate unexpectedly, after creating a complete
work file, but before being able to rename it to the final output file name. You might
want to know where that file is, and that is the reason for the
-temp_o
option. In other
words, it tells the linker which name to use, so that you don’t have to search through all
files with names of the form ZLDAF
nnn
.
Alternatively, if you specify the
-must_use_oname
option, that means
eld
reports an
error if
eld
cannot delete the existing file and rename the workfile to it. This is a better
behavior if
eld
is called from an automated script that knows how to watch out for
errors, but not how to check for the file being left in a different place. The
-
must_use_oname
option cannot be specified with the
-temp_o
option.
Creating Segments of the Output Loadfile
A segment is a contiguous portion of memory. The linker creates the segments of the
loadfile, i.e., the text segment, the gateway segment, and the data segment(s).
Appendix A, TNS/E Native Object Files
tells which sections go into each of the
segments, and which permissions are assigned by the linker to each of the segments.
A loadfile with callable procedures also has a gateway segment. There are two types
of gateways that the linker can create. One type is used for transitions from user mode
to exec mode, and the other for transitions from exec mode to kernel mode. All the
gateways within the same loadfile are of the same type. The linker creates the first type
of gateway, called a user gateway, if there are any procedures with the
CALLABLE
attribute. It creates the other type of gateway, called a kernel gateway, if there are any
procedures with the
KERNEL_CALLABLE
attribute.
eld
reports an error if a mixture of
both of these occur among the linker’s input linkfiles.
By default, the linker knows how to create the gateways.
The linker option named
-instance_data
, which takes a single parameter for which
there are five possibilities, tells the linker whether to create one data segment or two
Summary of Contents for eld
Page 4: ......
Page 8: ...Contents eld Manual 527255 009 iv ...
Page 12: ...What s New in This Manual eld Manual 527255 009 viii Changes to the 527255 005 Manual ...
Page 34: ...Introduction to eld eld Manual 527255 009 1 14 Example of Use ...
Page 54: ...eld Input and Output eld Manual 527255 009 2 20 Using Archives ...
Page 98: ...Other eld Processing eld Manual 527255 009 4 20 Merging Source RTDUs ...
Page 242: ...Output Listings and Error Handling eld Manual 527255 009 6 132 Glossary of Errors ...