DLL Programmer's Guide for TNS/R Systems

Finding Symbol Definitions
DLL Programmer’s Guide for TNS/R Systems—522203-002
4-2
The loadList
The linker or loader creates the loadList for a loadfile using the following algorithm:
1. [Initialize] To an empty loadList add the name of the designated file, and set a
pointer referring to this entry, making it the currently referenced loadfile.
2. If the designated file is the program and it has a user library, add the library name to
the loadList.
3. If the designated file has a non-empty libList, add its the libList entries in the same
order they appear in the libList.
4. [Begin loop] If there is another loadList entry immediately following the referenced
loadfile, set the reference pointer to it. If there are no more loadList entries, the loadList
is finished.
5. Append to the loadList , in the same order, the libList entries of the referenced
loadfile that are not already on the loadList.
6. Return to step 4. [End loop]
For the program and loadfiles of Figure 1-5 on page 1-12, Figure 4-2 on page 4-3
shows the evolution of the globalized loadList and the pointer status for each loop run
in the foregoing algorithm at the end of steps 4 and 5. That figure shows only the first
few runs of the loop and the last. The resulting loadList, is shown at the bottom of the
figure.