buildtask.1 2.33 KB
.TH buildtask 1P local "Silicon Graphics, Inc."
.SH NAME
buildtask \- simple "linker" for Ultra64 RSP programs.

.SH SYNOPSIS
\f3buildtask\f1 [-d off] [-f file] [-o file]   [-s cnt] [-l len] [-p file] obj ...
.br
.SH DESCRIPTION
This program is a crude "linker" that concatenates RSP objects, both
text sections and data sections, resulting in a new RSP object.
.PP
For each object, it enforces 64-bit alignment, computes lengths and
offsets, and updates the data section with this information.
.PP
The result is a single RSP object with all the information necessary
to perform code overlays at run time.
.PP
.SS "\f2Command Line Options:\f1"
.RS 5
.TP 12
.B \-s <cnt>
skip a number of words at the beginning of the text section of an
object, before concatenation.
.TP
.B \-l <len>
force object length.
.TP
.B \-p <file>
append a "pre-file" for this object, before concatenation. The
contents of 
.B <file> 
will be concatenated to the output text section before processing
the next object.
.TP
.B \-d <off>
DMEM offset for overlay table. The default is 0x0 (top of DMEM).
.TP
.B \-o <file>
output filename.
.TP
.B \-f <count>
number of DMEM files to use. Any DMEM files encountered after
.B <count>
objects have been processed will be ignored. This is useful for
overlays which share the same DMEM image.
.PP
.SS
The
.B -s, -l,
and
.B -p
flags affect the next object. They may appear multiple times,
affecting different objects.
.PP
.B obj
is an RSP object files to be concatenated. Multiple objects can be
specified, they are concatenated in the order given on the command
line.
.PP
.SS "\f2Overlay Table:\f1"
.PP
During processing, the 
.B lengths
and
.B offsets
are computed for each overlay. This information is stored in DMEM at
the offset supplied by the
.B -d
flag (default is 0x0).
.PP
The format of this overlay table is:
.RS 5
.TP 12
.B offset
32 bits, the offset of this object from the beginning of the text section.
.TP
.B size
16 bits, the size of this object.
.TP
.B destination
16 bits, the destination of this overlay (in IMEM). This field is
not generated by 
.B buildtask,
it is usually generated by the assembler (or hard-coded).

.SH NOTE
This program depends on the usage of the
.B OSTask
structure, and works in conjunction with the boot microcode and the
microcode that actually performs the overlay.

.SH "SEE ALSO"
.IR rspasm (1P),
.IR osSpTaskStart (3P)