Creating Segments Of The Output Loadfile - HP eld Manual

Table of Contents

Advertisement

eld Input and Output
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 ZLDAFnnn.
Alternatively, if you specify the -must_use_oname option, that means
error if
cannot delete the existing file and rename the workfile to it. This is a better
eld
behavior if
eld
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
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.
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
is called from an automated script that knows how to watch out for
eld Manual—527255-009
Creating Segments of the Output Loadfile
tells which sections go into each of the
reports an error if a mixture of
eld
2-6
reports an
eld

Advertisement

Table of Contents
loading

Table of Contents