LD
Section: Jul 21 1994 (1)
Updated: Sozobon Programmer's Manual
Index
Return to Main Contents
NAME
ld - The SozobonX Linker (loader)
SYNOPSIS
ld
[options] [<file> ...]
ld
[-Vvhtpmb][-v2]
[--nofload][--nofram]
[--nofmem]
[-B
<n>]
[-o
<file>]
[-u
<symbol>]
[-L
<path>]
[-f
<link file>] |
[<file> ...]
DESCRIPTION
The
ld
command links object modules and libraries to form
an executable program. Both object modules and libraries may be passed to
ld for linking. It can handle DRI, SozobonX objects and DRI archives only.
By default the output is written to file
'a.out',
and the
Fastload,
'load to FastRAM'
and the
'malloc from FastRAM'
program header flags are set.
Several options may be specified to alter the operation of the linker:
OPTIONS
Print detailed Version information to stdout and
exit
Print the synospsis information (usage) and exit
Generally show more information about what
ld
is doing and print short version information (to stderr).
If you put two
'v's
or a
'-v2'
into commandline
ld
will be more verbose, printing
the symbols looked for in the libraries, and the extern symbols of the newly
added modules from the libraries.
Increase the limits for internal buffers by factor
<n>.
This option will be replaced by some automatic allocation routines some
time.
Put a symbol table in the output file.
Make multiple passes over each library until no more references can be
satisfied. If libraries are ordered appropriately, this option is not
needed and linking will be faster.
This option is useful when many files are to be linked. The loader reads
the file
<file>
specified for a list of object modules and libraries to be
linked. Names in the file should be separated by white space or newlines.
cc
will always use this option.
By default, the name of the executable file is
'a.out'.
This option allows a different name to be specified.
Forces ld to link the symbol
<symbol>
at once if it is found in any library module.
The given symbol is marked as undefined. This can be useful when linking
from libraries. And a symbol (e.g.
__printf)
can be marked as undefined to
force loading it from a library, before another module (e.g. from another
library) asks for it.
This option can be used when linking large programs to reduce the amount of
memory used by the loader. The loader makes more disk accesses when this
option is used.
Print a load map. (I've read anywhere -M is standard?) A table of all
linked objects with their sizes is printed to stdout.
Add path to the search list to find following (in commandline)
libraries and object modules. The pathes specified with
-L
option are searched first, after cwd and before builtin or
$LIB
pathes, in the order specified in the commandline.
Do not set Fastload flag in program header of generated executable.
Do not set 'load to FastRAM' flag in program header of generated executable.
Do not set 'malloc from FastRAM' flag in program header of generated
executable.
ENVIRONMENT
$LIBDIR
This path replaces the builtin search pathes for libraries and object
modules not to find in cwd.
$LIB
A list of pathes where libraries and object modules are to search. If this
variable is specified the builtin pathes and the
$LIBDIR
path are ignored for searches.
If
$STDERR
is present, stderr handle (2) is used for diagnostic output.
DIAGNOSTICS
Warnings:
message:
Double def of <sym>: in <module (archive)> type <char>,
in <module (archive)> type <char>
Tells you that symbol <sym> is defined in the two named modules,
the second module name is the first definition. The type char
[Text|Data|Bss|Common|?] tells you the symbols' type in the module.
If a symbol is already defined, the first definition is used.
message:
Common sizes differ: <sym> in <module (archive)> <size>,
in <module (archive)> <size>
Tells you, that Common symbol <sym> is defined with different sizes
in different modules.
The larger size will be used for that symbol.
Error Messages:
message:
Undef <sym> from <module (archive)>
The symbol <sym>, used in <module> (maybe in others, too) isn't
defined in any specified module. (No output!)
message:
Undef Common <sym> from <module (archive)>
The Common symbol <sym> is never defined with a length value.
(No output is generated!);
LIMITS
The number of handled files, objects and symbols is still limited:
60 different files
1000 global symbols in resulting object (executable)
400 symbols in every object module
600 objects in a library (only used for rescanning - multiple passes)
300 objects currently used
SEE ALSO
cc(1), nm(1), ar(1), libsort(1)
BUGS
Without doubt, there are some bugs in this program. If you
discover one, please report it to maintainer.
AUTHOR
Written by Johann Ruegg,
Copyright (c) 1988,89,90,91 by Sozobon, Ltd.
eXtended Version by Holger Weets, Jerry G Geiger (1992-1995)
VERSION
ld V2.00x10 Apr 8 1995
Index
- NAME
-
- SYNOPSIS
-
- DESCRIPTION
-
- OPTIONS
-
- ENVIRONMENT
-
- DIAGNOSTICS
-
- LIMITS
-
- SEE ALSO
-
- BUGS
-
- AUTHOR
-
- VERSION
-
This document was created by
man2html,
using the manual pages.
Time: 09:04:09 GMT, February 14, 2025