mirror of
https://github.com/SEPPDROID/Digital-Research-Source-Code.git
synced 2025-10-23 00:14:25 +00:00
113 lines
4.7 KiB
Plaintext
113 lines
4.7 KiB
Plaintext
================= DRI FORMATTING NEEDED ================
|
|
|
|
ld8k(1) Loader/linker ld8k(1)
|
|
|
|
|
|
|
|
DESCRIPTION
|
|
|
|
ld8k - loader/linker
|
|
|
|
|
|
SYNOPSIS
|
|
|
|
ld8k [option] file ...
|
|
|
|
|
|
DESCRIPTION
|
|
|
|
Ld8k combines several object programs into one. It is capable
|
|
of linking both segmented and non-segmented Z8000 object
|
|
modules. However, all of the modules linked must be of the same
|
|
type. Ld8k also has facilities for searching libraries in the
|
|
format prepared by ar8k. Normally, the output (default = x.out)
|
|
is prepared for execution, however the -r option may be used to
|
|
preserve relocation information so that the output can be used
|
|
as further input to ld8k.
|
|
|
|
If no errors occur during the execution of ld8k, the output
|
|
module is marked with a magic word that indicates that it is
|
|
executable.
|
|
|
|
Arguments to ld8k are processed in the order that they appear in
|
|
the command line. Libraries are searched exactly once at the
|
|
point at which they appear in the command. Only routines that
|
|
resolve at least one external reference are loaded. Therefore
|
|
ordering of libraries is important.
|
|
|
|
Whether segmented or non-segmented linking is done depends on
|
|
the type of the first object module encountered, since no mixing
|
|
of types is permissible. In searching archives, only entry
|
|
points in modules having the correct type are considered. Hence
|
|
archives can have modules with duplicated entry point names so
|
|
long as they are in different object module types.
|
|
|
|
There are several options. Except for library specification (-
|
|
lxx), all should appear before any file names.
|
|
|
|
-i Prepare the object file for "split I and D" space. That
|
|
is, start the data addresses at zero, and in the case of
|
|
segmented loads, segment numbers can also be reused.
|
|
|
|
-lxx Search the library name "/lib/libxx.x" or if does not
|
|
exist, the library "/usr/lib/libxx.a". This may appear
|
|
anywhere in the command line.
|
|
|
|
-n Mark the text read only so that it may be shared. This is
|
|
meaningful only for non-segmented loads. The data boundary
|
|
is moved up to the next 8K byte boundary.
|
|
|
|
-o The next argument is taken as the name of the object file
|
|
instead of "x.out".
|
|
|
|
-r Preserve relocation information in the output even if all
|
|
references are resolved.
|
|
|
|
-s "Strip" the output by removing the symbol table and
|
|
relocation information to save space in the object file.
|
|
|
|
-S The next argument is a decimal number that sets the size of
|
|
the stack segment.
|
|
|
|
-u Enter the next argument as an undefined reference so that
|
|
loading can be accomplished solely from an archive file.
|
|
|
|
-D The next argument is taken to be a file name containing
|
|
segment numbers and name correspondences. In this way
|
|
specific segment numbers can be assigned to named segments,
|
|
or the loader can be forced to ignore specific segment
|
|
numbers. The format of the descriptor file is a sequence
|
|
of ASCII lines as follows:
|
|
|
|
<number>=<name>[,<name>]
|
|
|
|
or
|
|
|
|
<number>
|
|
|
|
The first form requires the named segments to be assigned
|
|
the given number. If all of the named segments will not
|
|
fit into 64KB, an error message will be issued. The order
|
|
in which the named segments are assigned to the numbered
|
|
segment is the order in which the names appear in the
|
|
control line. The second form effectively reserves the
|
|
segment number and does not permit the loader to use it. A
|
|
given segment number may only appear in a descriptor file
|
|
once. In the absence of a descriptor file, the default
|
|
named segments are processed in the order: __text, __data,
|
|
and __bss.
|
|
|
|
-D"descriptor line" this is a shorthand form of the preceding
|
|
control in which one line will suffice. -D commands may be
|
|
repeated, in which case they are processed in the order
|
|
they are encountered.
|
|
|
|
|
|
FILES
|
|
|
|
/lib/lib*.a libraries /usr/lib/lib*.a libraries
|
|
x.out object file
|
|
|
|
|
|
|