📄 ld.1
字号:
.th LD I 8/16/73.sh NAMEld \*- link editor.sh SYNOPSIS.bd ld[.bd \*-sulxrdni] name ....sh DESCRIPTION.it Ldcombines severalobject programs into one; resolves externalreferences; and searches libraries.In the simplest case the names of several objectprograms are given, and.it ldcombines them, producingan object module which can be either executed orbecome the input for a further.it ldrun.(In the latter case, the.bd \*-roption must be givento preserve the relocation bits.)The output of.it ldis left on.bd a.out.This file is made executableonly if no errors occurred during the load..s3The argument routines are concatenated in the orderspecified. The entry point of the output is thebeginning of the first routine..s3If any argument is a library, it is searched exactly onceat the point it is encountered in the argument list.Only those routines defining an unresolved externalreference are loaded.If a routine from a libraryreferences another routine in the library,the referenced routine must appear after thereferencing routine in the library.Thus the order of programs within librariesis important..s3.it Ldunderstands several flag arguments which are writtenpreceded by a `\*-'.Except for \fB\*-l\fR,they should appear before the file names..s3.lp +4 4\fB\*-s\fR `squash' the output, that is, remove the symbol tableand relocation bits to save space (but impair theusefulness of the debugger).This information can also be removed by.it strip..s3.lp +4 4\fB\*-u\fR take the following argument as a symbol and enterit as undefined in the symbol table. This is usefulfor loading wholly from a library, since initially the symboltable is empty and an unresolved reference is neededto force the loading of the first routine..s3.lp +4 4\fB\*-l\fR Thisoption is an abbreviation for a library name.\fB\*-l\fRalone stands for `/lib/liba.a', whichis the standard system library for assembly languageprograms.\fB\*-l\fIx\fRstands for `/lib/lib\fIx\fR.a' where \fIx\fR is any character.A library is searched when its name is encountered,so the placement of a \fB\*-l\fRis significant..s3.lp +4 4\fB\*-x\fR do not preserve local(non-.globl) symbols in the output symbol table; only enterexternal symbols.This option saves some space in the output file..s3.lp +4 4\fB\*-X\fR Save local symbolsexcept for those whose names begin with `L'.This option is used by.it ccto discard internally generated labels whileretaining symbols local to routines..s3.lp +4 4\fB\*-r\fR generate relocation bits in the output fileso that it can be the subject of another.it ldrun.This flag also prevents final definitions from beinggiven to common symbols,and suppresses the `undefined symbol' diagnostics..s3.lp +4 4\fB\*-d\fR force definition of common storageeven if the.bd \*-rflag is present..s3.lp +4 4\fB\*-n\fR Arrange thatwhen the output file is executed,the text portion will be read-only and sharedamong all users executing the file.This involves moving the data areas up the the firstpossible 4K word boundary following theend of the text..s3.lp +4 4\fB\*-i\fR When the output file is executed, the programtext and data areas will live in separate address spaces.The only difference between this optionand.bd \-nis that here the data starts at location 0..i0.dt.sh FILES/lib/lib?.a libraries.bra.out output file.sh "SEE ALSO"as (I), ar (I).sh BUGS
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -