Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

as(1)

cc(1)

fc(1)

exit(2)

end(3C)

a.out(4)

ar(4)

LD(1)  —  Stardent Computer Inc. (Software Generation System Utilities)

NAME

ld − link editor for common object files

SYNOPSIS

ld [options] filename

DESCRIPTION

The ld command combines several object files into one, performs relocation, resolves external symbols, and supports symbol table information for debugging.  In the simplest case, the names of several object programs are given, and ld combines the objects, producing an object module that can be executed.  The output of ld is left in a.out.  By default this file is executable if no errors occurred during the load.  If any input file, filename, is not an object file, ld assumes it is an archive library. 

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.  The library (archive) symbol table [see ar(4)] is searched sequentially with as many passes as are necessary to resolve external references which can be satisfied by library members.  Thus, the ordering of library members is functionally unimportant, unless there exist multiple library members defining the same external symbol.

The following options are recognized by ld:

−B hhhhhhh
Generate an a.out file with the bss address at hhhhhhh. 

−D hhhhhhh
Generate an a.out file with the data address at hhhhhhh. 

−esym
Set the default entry point address for the output file to be that of sym. 

−L Do not search for -l libraries in /lib or /usr/lib. 

−Ldir
Search for -l libraries in dir. 

−m Generate a simple load map on standarad output. 

−n Generate NMAGIC file type. 

−o filename
Place the output into filename. 

−opct
Insert code into the program that produces a count of all the FPU ops executed by the program, dynamically.

−p Generate code to profile the source file during execution. 

−r Produce a relocatable output file. 

−s Strip line numbers and symbol table information from the output object file. 

−T hhhhhhh
Generate an a.out file with the text address at hhhhhhh. 

−t Turn off warnings about multiply defined symbols that are not the same size. 

−uname
Enter name as an undefined symbol in the symbol table. 

−V Print version information. 

−yname
Trace name and print out all uses and definitions. 

FILES

LIBDIR/libx.a libraries

LLIBDIR/libx.a libraries

a.out output file

LIBDIR usually /lib

LLIBDIR usually /usr/lib

SEE ALSO

as(1), cc(1), fc(1), exit(2), end(3C), a.out(4), ar(4). 
Programmer’s Guide. 

September 29, 2021

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