Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ ld(1) — AUX SR8.0

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

ar(1)

cc(1)

a.out(5)

LD(1)

NAME

ld − link editor

SYNOPSIS

ld [ −sulxXrdnim ] [ −o name ] [ −t name ] [ −V num ] file ... 

DESCRIPTION

Ld combines several object programs into one; resolves external references; and searches libraries (as created by lbr, the DOMAIN librarian.  In the simplest case several object files are given, and ld combines them, producing an object module which can be either executed or become the input for a further ld run.  (In the latter case, the −r option must be given to preserve the relocation bits.)  The output of ld is left on a.out.  This file is made executable if no errors occurred during the load and the −r flag was not specified. 

The argument routines are concatenated in the order specified.  The entry point of the output is the beginning of the first routine. 

If any argument is a library, it is searched exactly once at the point it is encountered in the argument list.  Only those routines defining an unresolved external reference are loaded.  If a routine from a library references another routine in the library, the referenced routine must appear after the referencing routine in the library.  Thus the order of programs within libraries is important. 

In the AUX environment, the symbols _etext, _edata and _end (etext, edata and end in C) are not defined. 

Ld understands several flag arguments which are written preceded by a −.  Except for −l, they should appear before the file names. 

−s Unsupported; ignored if used. 

−u Unsupported; produces an error if used. 

−l This option is an abbreviation for a library name.  In the AUX environment, -l alone stands for /usr/lib/libc.a, which is the standard system library for C programs.  −lx stands for /usr/lib/libx.a, where x is a string.  A library is searched when its name is encountered. 

−x Unsupported; ignored if used. 

−X Unsupported; ignored if used. 

−r Activates the -ALLMARK option to the DOMAIN BIND program. 

−d Force definition of common storage even if the −r flag is present. 

−n

−N Unsupported; ignored if used. 

−i Unsupported; ignored if used. 

−m Unsupported; produces an error if used. 

−o The name argument after −o is used as the name of the ld output file, instead of a.out. 

−t Unsupported; produces an error if used. 

−V Unsupported; produces an error if used. 

FILES

/usr/lib/lib?.a
libraries

a.out output file

SEE ALSO

ar(1), cc(1), a.out(5). 

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026