HP eld Manual page 63

Table of Contents

Advertisement

Binding of References
registry has been found then the default for the -unres_symbols option is error. In
other words,
eld
public DLL registry has been found.
On the other hand, regardless of what the default would have been, and regardless of
whether the -unres_symbols option actually was specified, the linker imposes -
unres_symbols ignore in the following cases:
If the -allow_missing_libs option has been specified and there were any
missing DLLs.
If the linker is building a program that has a user library and the linker has not been
able to open the user library.
The linker does not check for unresolved references when the -r option is specified,
and
reports an error if you specify any of the options described above with -r.
eld
Note that, even if the linker is not presetting, it will still try to resolve references for the
purpose of producing messages about unresolved symbols.
If there are unresolved references to symbols that are not globalized, and this is not
being considered an error, and the linker is presetting, then the linker must decide what
to do with those references. If the reference is to a symbol that is expected to be code,
the linker will look for a symbol named UNRESOLVED_PROCEDURE_CALLED_. The
linker looks for this symbol by first looking for a symbol of this name that is exported by
the loadfile being created, and then looks for the symbol in the usual way through
DLLs. If found, and it is a procedure, then the references to the desired symbol are
resolved to this symbol, and the file can still be preset. The references are still
considered to be unresolved as far as putting out messages about unresolved symbols
is concerned. If presetting is successful in this case, the LIC tells that there were
unresolved references.
If unresolved references to symbols that are not globalized cannot be handled as
described in the previous paragraph then the linker decides that the file cannot be
preset. Therefore, whenever a file is preset, it means that all references to symbols
that are not globalized were resolved to something.
The reason that unresolved references to code get more lenient treatment than
unresolved references to data is that it is possible to handle them in a more predictable
way at runtime. Specifically, the HP NonStop operating system provides an
implementation of UNRESOLVED_PROCEDURE_CALLED_ that generates a SIGILL
signal that can be caught but not deferred.
Whether or not the linker can preset is not affected by whether there are any
unresolved references to globalized symbols.
UNRESOLVED_PROCEDURE_CALLED_ is never used to handle unresolved references
to globalized symbols. UNRESOLVED_PROCEDURE_CALLED_ is also not used to
handle unresolved references to $n_EnterPrivN symbols from gateways.
There is also an option named -set rld_unresolved, with the same three
parameter values as for -unres_symbols, and with error as the default. The linker
places the value specified by this option into the RUNTIME_UNRES_CHECKING bits of
only thinks it is unreasonable to have unresolved references if the
eld Manual—527255-009
3-9
Handling Unresolved References

Advertisement

Table of Contents
loading

Table of Contents