[Oberon] Exporting pointers

Andreas Pirklbauer andreas_pirklbauer at yahoo.com
Thu Dec 21 15:51:40 CET 2017


> We have used “exno" for Procedures and Vars as well.

The key idea here is to keep symbol files stable even if the implementation,
but not the interface, of a module changes. This is achieved by including a
running number (exno) rather than absolute addresses (of procedures and
variables) in symbol files. In the case of record types, exno actually
refers to its type descriptor.

The object file also uses these export numbers, e.g. in instructions.

The translation to actual memory addresses is deferred to module load
time (when the destination address of a module is known). This is why
there is code to “fix up” the chain of export numbers at the end of
the loader (procedure Modules.Load).

But all this is explained in great detail in the book Project Oberon
2013 Edition, e.g. chapter “12.6.1. The structure of the symbol table”.
Careful reading of the book, together with tracing the code should
answer most of your questions. The book really is quite complete.
There is hardly any concept or implementation aspect that is not
presented. Also, you can use the tools ORTool.DecSym and ORTool.DecObj
on some test programs to further deepen the understanding of the
various concepts.









-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.inf.ethz.ch/pipermail/oberon/attachments/20171221/02aa631b/attachment.html>


More information about the Oberon mailing list