|
|
1.1 ! root 1: .pa 1 ! 2: .he 'LD (I)'3/15/72'LD (I)' ! 3: .ti 0 ! 4: NAME ld -- link editor ! 5: .sp ! 6: .ti 0 ! 7: SYNOPSIS ld__ [ -sulxr______ ] name\d1\u ... ! 8: .sp ! 9: .ti 0 ! 10: DESCRIPTION ld__ combines several ! 11: object programs into one; resolves external ! 12: references; and searches libraries. ! 13: In the simplest case the names of several object ! 14: programs are given, and ld__ combines them, producing ! 15: an object module which can be either executed or ! 16: become the input for a further ld__ run. ! 17: In the latter case, the "-r" option must be given ! 18: to preserve the relocation bits. ! 19: .sp ! 20: The argument routines are concatenated in the order ! 21: specified. The entry point of the output is the ! 22: beginning of the first routine. ! 23: .sp ! 24: If any argument is a library, it is searched exactly once. ! 25: Only those routines defining an unresolved external ! 26: reference are loaded. ! 27: If a routine from a library ! 28: references another routine in the library, ! 29: the referenced routine must appear after the ! 30: referencing routine in the library. ! 31: Thus the order of programs within libraries ! 32: is important. ! 33: .sp ! 34: ld__ understands several flag arguments which are written ! 35: preceded by a "-": ! 36: .sp ! 37: .in +6 ! 38: .ti -3 ! 39: -s "squash" the output, that is, remove the symbol table ! 40: and relocation bits to save space (but impair the ! 41: usefulness of the debugger). ! 42: This information can also be removed by strip_____. ! 43: .ti -3 ! 44: .sp ! 45: -u take the following argument as a symbol and enter ! 46: it as undefined in the symbol table. This is useful ! 47: for loading wholly from a library, since initially the symbol ! 48: table is empty and an unresolved reference is needed ! 49: to force the loading of the first routine. ! 50: .sp ! 51: .ti -3 ! 52: -l This option is an abbreviation for a library name. ! 53: "-l" alone stands for "/usr/lib/liba.a", which ! 54: is the standard system library for assembly language ! 55: programs. ! 56: "-lx" stands for "/usr/lib/libx.a" where x is any character. ! 57: There are libraries for Fortran (x="f"), C (x="c"), Explor (x="e") and B (x="b"). ! 58: ! 59: .ti -3 ! 60: -x Do not preserve local ! 61: (non-.globl) symbols in the output symbol table; only enter ! 62: external symbols. ! 63: This option saves some space in the output file. ! 64: ! 65: .ti -3 ! 66: -r generate relocation bits in the output file ! 67: so that it can be the subject of another ld__ run. ! 68: .sp ! 69: .in -6 ! 70: The output of ld__ is left on a.out_____. This file is executable ! 71: only if no errors occurred during the load. ! 72: .sp ! 73: .ti 0 ! 74: FILES /usr/lib/lib?.a libraries ! 75: .br ! 76: a.out output file ! 77: .sp ! 78: .ti 0 ! 79: SEE ALSO as(I), ar(I) ! 80: .sp ! 81: .ti 0 ! 82: DIAGNOSTICS "file ! 83: not found"-- bad argument ! 84: .sp ! 85: "bad format"-- bad argument ! 86: .sp ! 87: "relocation error"-- bad argument (relocation ! 88: bits corrupted) ! 89: .sp ! 90: "multiply defined"-- same symbol defined twice in same load ! 91: .sp ! 92: "un"-- stands for "undefined symbol" ! 93: ! 94: "symbol not found"-- loader bug ! 95: ! 96: "can't move output file"-- can't move temporary to a.out file ! 97: ! 98: "no relocation bits"-- an input file lacks relocation information ! 99: ! 100: "too many symbols"-- too many references to external ! 101: symbols in a given routine ! 102: ! 103: "premature EOF" ! 104: ! 105: "can't create l.out"-- cannot make temporary file ! 106: ! 107: "multiple entry point"-- more than one entry point ! 108: specified (not possible yet). ! 109: .sp ! 110: .ti 0 ! 111: BUGS --
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.