eld Input and Output
eld Manual—527255-009
2-11
Using a DLL Registry
described below (after, in effect, deleting the old entry for the DLL from the registry),
and updates the registry accordingly.
The
-grow_limit
option may only be specified if
-update_registry
is used. If
-grow_limit
is not specified then the linker determines the reserved size of the DLL
from the following options, which are only allowed when
-update_registry
is used
and
-grow_limit
is not used:
•
-grow_text_amount
the absolute amount by which the text may grow
•
-grow_data_amount
the absolute amount by which the data may grow
•
-grow_percent
the percentage amount by which the text or data may grow
The defaults for
-grow_text_amount
and
-grow_data_amount
are 0. The
default for
-grow_percent
is 10. A size is calculated for each of text and data by
first adding the corresponding “amount” option to the size of that segment (before
rounding), or adding the percentage specified by the “percent” option to the size of that
segment (before rounding), and taking the maximum of these two values. The resulting
size for each segment is then rounded up to a multiple of 64KB (or, 128KB if the linker
is building an implicit DLL), and the sum of these two sizes is the reserved size of the
DLL.
When the linker is choosing a new place for a DLL, because it wasn’t specified in the
registry before or didn’t fit where the the registry previously specified, and the
-grow_limit
option has been given, the reserved size that the linker gives to the
new entry in the registry is the value specified in the
-grow_limit
option, rounded
up to a multiple of 64KB (or, 128KB if the linker is building an implicit DLL). In this case
eld
reports an error if the sum of the sizes of all the segments of the DLL (including
rounding) is larger then the value specified in this option (rounded up to a multiple of
64KB or 128KB, depending on whether it is an implicit DLL).
If the DLL name was not already listed in the file, or didn’t fit in the place previously
listed for it, then the linker chooses the address for the DLL by looking for blocks of
space that are at least as large as the reserved size for this DLL, that lie within the
range of addresses that the registry allows for DLLs, and that don’t overlap the space
reserved for any other DLLs in the registry.
eld
reports an error if there is no block
large enough. The linker chooses such a block that is closest to the starting address
for the registry. Thus, the linker searches upward from the lower bound of possible
addresses, or downward from the upper bound, depending on how the bounds were
specified for this registry. The registry is updated to tell the address and reserved size
of the new DLL.
If the user wishes to specify an address for a new DLL in the registry, rather than
letting the linker choose the address, the registry file can be edited by hand. It is
necessary to specify both the starting address of the DLL and its reserved size, as
multiples of 64KB. Or, if this is a registry that is being used for implicit DLLs, then they
should be multiples of 128KB. It is also possible to change these values for a DLL
already listed in the registry. It is permissible to edit a registry so that some DLLs have
overlapping address ranges. When the linker picks an address on its own it requires
that this DLL not overlap any other ones in the registry, but the linker doesn’t check
Содержание eld
Страница 4: ......
Страница 8: ...Contents eld Manual 527255 009 iv ...
Страница 12: ...What s New in This Manual eld Manual 527255 009 viii Changes to the 527255 005 Manual ...
Страница 34: ...Introduction to eld eld Manual 527255 009 1 14 Example of Use ...
Страница 54: ...eld Input and Output eld Manual 527255 009 2 20 Using Archives ...
Страница 98: ...Other eld Processing eld Manual 527255 009 4 20 Merging Source RTDUs ...
Страница 242: ...Output Listings and Error Handling eld Manual 527255 009 6 132 Glossary of Errors ...