HP eld Manual page 80

Table of Contents

Advertisement

Other eld Processing
Adjusting Loadfiles: The -alf Option
-alf recreates the file by the usual linker mechanisms.
Certain relocation sites within a file must be set up by the linker, whether the file is
preset or not, and must never become inconsistent thereafter. That is because
rebinding makes use of the existing values at those sites. Such sites only need
modification if a file is being rebased. Because updating in place would run the risk of
terminating unexpectedly in the middle, leaving such sites inconsistent, we never
update in place when rebasing is being done. This is why -alf always recreates the
file, rather than updating it in place.
The -alf option can be applied to a DLL whose segments are not contiguous, i.e.,
when the DLL was created by using the -d option to place its data separate from its
code.
The parameter to the -alf option is the name of an existing program or DLL.
eld
reports an error if this file does not exist, or if it is any other kind of file. This option
performs the same version number checking on this loadfile as is described in
Input
Object Files
on page 2-12.
When the -alf option is used, the names of input linkfiles cannot be specified. All the
code, data, symbols information, etc., comes from the existing loadfile. Archives and
DLLs cannot be specified, either directly in the command stream or with -l options.
The linker uses the DLL names found in the .liblist section of the existing loadfile as if
they were specified in the command stream with -l options.
When the -alf option is used, it is possible to put the name of the import library that
represents the implicit libraries directly on the command line. This is an exception to
the rule stated in the previous paragraph, that no filenames can be on the command
line. On the other hand, it keeps the processing of the -alf option consistent with
usual linker processing with regard to the ability to get the name of this import library
from the command line. The filename specified on the command line overrides any
other way the -alf option may have found the import library that represents the
implicit libraries.
reports an error if you have more than one filename on the
eld
command line with -alf . The -alf option always reset the goldsmith_region_info
and goldsmith_region_addr fields of the .tandem_info section to zero.
The -alf option updates the update_timestamp if there were any other changes
made to the file. It does not update the update_timestamp if that would be the only
change to the file. It never updates the creation_timestamp. An informational message
tells whether the file required any changes.
The -alf option cannot create an import library in parallel with updating a loadfile, nor
can they be used to update an import library. When the -alf option is used to rebase
a DLL, many things in the DLL change in ways that affect users of that DLL, such as
the addresses of its exported symbols. If you had an import library that matched the
previous version of that DLL, you would therefore probably want to run the linker with
the -make_import_lib command on the new DLL afterward in order to create a
new import library that matched it. Do not worry about this when using the
-alf option just to rebind a DLL, because in that case the only change to the DLL
that would be reflected in a corresponding import library is whether the ELF file header
eld Manual—527255-009
4-2

Advertisement

Table of Contents
loading

Table of Contents