The Linker's Inclusion Algorithm

When you build a program package or library package that imports one or more library packages, the interfaces you IMPORT from within those imported packages must be visible. However, there are other requirements you must satisfy when building a program.

The Modula-3 language definition defines a complete program to be "a collection of modules and interfaces that contains every interface imported or exported by any of its modules or interfaces, and in which no procedure, module, or interface is multiply defined" (Section 2.5, page 42). There are other requirements on a complete program as well. For example, every declared procedure must have an implementation, and every opaque type must have a concrete revelation.

When you build a program that imports library packages, not all of the interfaces and modules in those libraries are necessarily included by the linker. In fact, only those interfaces and modules that satisfy a reachability requirement are linked into the final program.

More Information


[Up: Linking] [Modula-3 home page]

m3-request@src.dec.com
Last modified on Mon Sep 25 18:30:25 PDT 1995 by heydon
     modified on Wed Apr 12 13:34:39 PDT 1995 by kalsow