National Institute of Advanced Industrial Science and Technology (AIST) This page is a page of the former research institute. We stopped updating on March 31.2001.
E-mail to webmaster (Japanese) E-mail to webmaster (English)
next up previous contents index
Next: Debugging Aid Up: Evaluation Previous: Compilation

Program Loading

 

emtabbing9908

On Solaris2 OS, the loading of compiled code is done by calling dlopen in the dynamic loader library. The use of dlopen is restricted to shared objects which is compiled position independently with "-K pic" option. Also, since dlopen cannot open the same file twice, load first does dlclose on the file already loaded.

  load-files &rest files [function]

  *modules* [variable]   provide module-name [function]   require module-name &optional file [function]
  • loads file unless module-name is found in *modules*. provide and require control dependency among modules and are used to avoid duplicated loading of basic modules. Suppose you have one basic module named "A" and two application modules named "B" and "C" which are independent from each other but rely on "A" module. At the beginning of each file, module name is declared by provide. Since "A" module does not depend on any other modules it does not require anything. (require "A" "a.o") follows calls to provide in "B" and "C". If you load "B" (more precisely, "b.o"), "a.o" is also loaded since it is found in *modules* and two module names "A" and "B" are added to *modules*. Then if you load "C", "A" module is not loaded and "C" is added to *modules*.
 

emtabbing10001

  • link-load a binary file.
  system:txtload fname [function]


next up previous contents index
Next: Debugging Aid Up: Evaluation Previous: Compilation

Hirofumi Nakagaki
Fri Mar 22 12:46:38 JST 1996