eld Input and Output
eld Manual—527255-009
2-10
Using a DLL Registry
•
a <hexadecimal number> to tell the starting address of the DLL
•
a <hexadecimal number> to tell the reserved size of the DLL
Together, the starting address and the reserved size tell the total range of addresses
that this DLL, or possibly a larger version of it in the future, occupies or is intended to
occupy.
Whenever the linker opens a registry, it checks for the following errors.
eld
reports an
error if any of the DLL ranges listed in the registry extend outside the range of
addresses that the registry allows for DLLs. It is also an error if any of the addresses or
ranges in the registry are not multiples of 64KB if the linker is not building an implicit
DLL, or 128KB if the linker is building an implicit DLL.
The linker determines whether the registry contains an entry for the DLL being built by
comparing the name of the file being created (as specified in the
-o
option) against
the names listed in the registry.
eld
reports an error if the name is found more than
once in the registry.
Note that the name comparison mentioned in the previous paragraph is by an exact
match. For example, if you have several DLLs that you store in sibling subdirectories,
named
a, b,
..., you might choose to have a single registry file that lists all the DLLs
with names relative to that parent directory, such as
a/libdll1.so
, etc. In that case,
you would have to spell the filename of each DLL that way in the
-o
option when you
were creating it, which means that you’d have to be running the linker in the parent
directory. Or, if the filenames were unique in all these directories, you might choose to
put only the last part of the name into the registry, in which case you would have to be
within the appropriate subdirectory when building the DLL. Or, even if you have all your
DLLs in one place, you still need to be consistent in how you spell their names in
-o
options, for example, not saying
libdll1.so
the first time you build it and
./libdll1.so
the next time you expect to find it in the registry.
When
-check_registry
is used
eld
reports an error if a registry file of the specified
name does not exist, or cannot be opened for reading, or does not have the proper
format, as described above, or if the name of the DLL being built is not found in the
registry. The entry for that DLL then tells the starting address to use.
eld
reports an
error if the DLL does not fit within the size reserved for it in the registry. The registry is
not modified.
The rest of this section describes what happens when
-update_registry
is used.
In this case, a registry file of the specified name need not already exist. If it does not
exist then the linker creates it. If the registry file already exists
eld
reports an error if
the file does not have the proper format. The DLL name need not already be listed in
the file.
If the DLL name was already listed in the file then the address listed for the DLL in the
file is a suggested address. The DLL is placed at this address if the size required for it,
including the necessary rounding but not including any room for growth, is less than
the size reserved for it in the registry. In this case the registry is not updated.
Otherwise, the linker emits a warning message, chooses an address for the DLL as
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 ...