Overlays

The compiler and runtime system support (on some machines) a limited form of dynamic loading. This feature allows you to compile and link the usually large, fixed piece of your program, the iceberg, once. And then, recompile and link a much smaller piece, the tip, in each cycle of editing and debugging.

To produce an iceberg for a program foo, invoke m3 with "-o foo.b" and a list of the modules and libraries that are to be in the iceberg. The presence of the .b suffix tells the compiler to build an iceberg. The compiler will generate two additional files, foo.bx which contains the linker information for the iceberg and foo.by which contains the global symbol table for the iceberg.

To produce the corresponding tip, invoke m3 as you would if there was no iceberg, replacing the modules and libraries included in the iceberg by the iceberg's name. The compiler will produce a short shell script under the name of your program, foo, and the actual bits of the overlay in another file, foo.ov.

For example, if you would normally build your program with the following command:

    m3 -o foo A.m3 B.i3 B.m3 C.i3 C.m3 -lmylib
Then, the following builds an iceberg that contains C and mylib:
    m3 -o foo.b C.i3 C.m3 -lmylib
And finally,
    m3 -o foo A.m3 B.i3 B.m3 foo.b
builds the tip.


[Modula-3 home page]

m3-request@src.dec.com
Last modified on Thu Jan  4 11:09:09 PST 1996 by heydon
     modified on Thu Apr 21 13:10:26 PDT 1994 by kalsow
     modified on Fri Feb  7 00:38:19 PST 1992 by muller
Copyright (C) 1992, 1996, Digital Equipment Corporation. All rights reserved.
See the COPYRIGHT for a full description.