eld Input and Output
eld Manual—527255-009
2-7
Creating Segments of the Output Loadfile
and what additional rules should be enforced, as shown in the following table.
eld
reports an error if you specify the
-instance_data
option more than once with
different parameters.
eld
reports an error if you specify
-instance_data
with
-r
.
* The data2protected parameter is supported only on systems running J06.09 or earlier J-series RVUs and H06.20
or earlier H-series RVUs.
If the loadfile being created had no data that would go into the data variable segment
then the linker sets the
data1constant
bit in the
e_flags
field of the ELF file header.
Otherwise, the linker sets the bit that corresponds to which parameter was given to the
-instance_data
option. The three different values set in the
e_flags
field in these
cases tell the HP NonStop operating system how to protect the data variable segment.
When the
-make_implicit_lib
option is used,
-instance_data
data1constant
is imposed, and
eld
reports an error if you specify
-instance_data
with any other parameter value.
There is no special boundary between the initialized data and the uninitialized data in
the data (variable) segment. If the last portion of initialized data happens to be zero,
the linker considers it to be within the uninitialized data, because what is called
“uninitialized” data gets initialized to zero by the operating system. That possibly
makes the size of the initialized data smaller within the object file. Based on this, the
linker will fill in the
p_filesz
field of the appropriate program header. On the other hand,
the linker also rounds up this value to a multiple of 4 kilobytes, thus possibly making
the size of the initialized data larger. This tells the amount of space occupied by the
appropriate segment within the loadfile, and the portion rounded up by the linker is
initialized to zero in the loadfile.
The program header of type
PT_TANDEM_RESIDENT
points at the .
restext
section,
that is, the resident code. There is no special boundary between the resident and non-
resident code.
For a DLL the
-t
option specifies the starting address of the text segment of the DLL
in memory. If the
-t
option is not used then it is possible for the DLLs address to be
determined by using a DLL registry, as covered in the sub-section below.
Table 2-1. Parameters to the -instance_data Option
Parameter
Meaning
data1
Create one data segment. (This is the
default.)
data2
data2protected*
data2hidden
These three cases tell the linker to create
two data segments, i.e., the “data
constant” segment and the “data variable”
segment.
data1constant
It is an error to have any data that would
need to go into the data variable segment
if we were told to create two segments.
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 ...