Skip to main content


This document gives a guide to using the linker system to link application objects generated by the assembler.

Installing The linker

The compiler system is written in Java and so to use it you must have a recent version of the Java runtime system installed. Once this is achieved, you should be able to sucessfully issue the following command : machine% java -version java version "1.2" Having installed a Java runtime system, you should set up your CLASSPATH environment variable to point at the installation JAR file containing the compiler system : machine% CLASSPATH=$CLASSPATH:linker.jar To link an application you invoke the linker with a command like machine% java linker.Linker -source0 myApp.preobj -source1 stdlib.preobj -target myApp.preout

Linker command line options

The linker has a set of input objects specified on hte command line, and an optional output file name for the final executable image. The name of the output file is a.preout if one is not specified.

The input objects are specified using the -sourcei option where i denotes the object number, counting from 0. The output file name is specified with the -target option.

Linker Errors

The linker may fail to resolve all the relocations for an application. This will normally be due to missing library or user application objects named on the command line. The table below specifies the errors emitted by the linker:

Error Cause Solution
Unresolved external symbol func [in file file] There is no function func (called from file file) declared in any of the other objects. Link with the missing object file, or correct the function name in the source program.
Unresolved partition p in file file Partition p has not been declared in the object, and it is used within the object relocation requests. Tell Dan that the assembler let one through, this should not happen.