HP eld Manual page 44

Table of Contents

Advertisement

eld Input and Output
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.
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.
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
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.
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
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
reports an error if the name is found more than
eld
reports an error if a registry file of the specified
eld
eld Manual—527255-009
2-10
Using a DLL Registry
reports an
eld
reports an
eld
reports an error if
eld

Advertisement

Table of Contents
loading

Table of Contents