DLL Programmer's Guide for TNS/R Systems
Finding Symbol Definitions
DLL Programmer’s Guide for TNS/R Systems—522203-002
4-10
The SearchList for a Globalized Loadfile
below, the programmer of globalized DLL B links it to another globalized library, called
F, that exports the symbol definition of john that B should use. Thus, there appears to
be no ambiguity, and the resolution of john should be simple. But, because B is
globalized, the loader sees it differently.
When loading Program, the loader’s picture is shown in the lower part of Figure 4-5,
which includes DLL B and Lib F as they were linked in the upper part of the figure.
Program requires A, B, and C, and it turns out that john is exported by both A and F.
Recall that imported symbols for every globalized loadfile are resolved using Program’s
globalized searchList, which is Program, UL, A, B, C, H, D, E, F, and G. Because the
loader encounters A’s definition of john before F’s and because B is globalized, the
loader satisfies B’s need with A’s definition, not F’s. If B’s programmer expected
otherwise, there is a surprise in store.
Figure 4-5. Localized and Globalized Symbol Resolution
Program
DLL A
DLL B
DLL C
DLL D
DLL E
Lib G
Lib F
Lib A
Lib B
Lib C
Lib F
Lib D
Lib E
Lib F
Lib G
Lib G
VST045.vsd
User Library
(DLL)
Lib H
Lib H
Imports john
Exports john
Exports john
Program loaded with its required DLLs, including B
DLL B
Lib F
Lib F
Exports john
DLL B as it was linked.