|
|
1.1 ! root 1: .TH LD68 1 ! 2: .SU ! 3: .SH NAME ! 4: ld68 \- .b -> b.out linker for the MC68000 ! 5: .SH SYNOPSIS ! 6: .B ld68 ! 7: [ option ] ... file ... ! 8: .SH DESCRIPTION ! 9: .I Ld68 ! 10: combines several ! 11: object programs into one, resolves external ! 12: references, and searches libraries. ! 13: In the simplest case several object ! 14: .I files ! 15: are given, and ! 16: .I ld68 ! 17: combines them, producing ! 18: an object module which can be either executed or ! 19: become the input for a further ! 20: .I ld68 ! 21: run. ! 22: (In the latter case, the ! 23: .B \-r ! 24: option must be given ! 25: to preserve the relocation bits.)\ ! 26: The output of ! 27: .I ld68 ! 28: is left on ! 29: .BR b.out . ! 30: This file is made executable ! 31: only if no errors occurred during the load. ! 32: .PP ! 33: The argument routines are concatenated in the order ! 34: specified. ! 35: .PP ! 36: The entry point of the output is determined by the first applicable item of the ! 37: following list: the \fB\-e\fP option if given, the value of the symbol _start ! 38: if defined, or the text origin (first instruction). ! 39: .PP ! 40: If any argument is a library, it is searched exactly once ! 41: at the point it is encountered in the argument list. ! 42: Only those routines defining an unresolved external ! 43: reference are loaded. ! 44: If a routine from a library ! 45: references another routine in the library, ! 46: the referenced routine must appear after the ! 47: referencing routine in the library. ! 48: Thus the order of programs within libraries ! 49: may be important. ! 50: .PP ! 51: The symbols `\_etext', `\_edata' and `\_end' ! 52: (`etext', `edata' and `end' in C) ! 53: are reserved, and if referred to, ! 54: are set to the first location above the program, ! 55: the first location above initialized data, ! 56: and the first location above all data respectively. ! 57: It is erroneous to define these symbols. ! 58: .PP ! 59: .I Ld68 ! 60: understands several options. ! 61: Except for ! 62: .BR \-l , ! 63: they should appear before the file names. ! 64: .TP ! 65: .B \-D ! 66: Take the next argument as a decimal number and pad the data segment ! 67: with zero bytes to the indicated length. ! 68: .TP ! 69: .B \-d ! 70: Force definition of common storage ! 71: even if the ! 72: .B \-r ! 73: flag is present. ! 74: .TP ! 75: .B \-e ! 76: The following argument is taken to be the ! 77: name of the entry point of the loaded ! 78: program; location 0x1000 is the default. ! 79: .TP ! 80: .B \-f ! 81: Fold case on identifiers. ! 82: That is, upper and lower case letters are not distinguished. ! 83: Used to link with Pascal routines, for example. ! 84: .TP ! 85: .BI \-l x ! 86: This ! 87: option is an abbreviation for the library name ! 88: .RI `/usr/sun/lib/lib x .a', ! 89: where ! 90: .I x ! 91: is a string. ! 92: A library is searched when its name is encountered, ! 93: so the placement of a ! 94: .B \-l ! 95: is significant. ! 96: .TP ! 97: .BI \-v x ! 98: This denotes board version ! 99: .I x ! 100: which may at present only be 'm' for Motorola Design Module. The default board ! 101: version is the Sun1 prototype, v1. ! 102: .TP ! 103: .B \-M ! 104: Create a human-readable list of symbols in ``sym.out''. ! 105: .TP ! 106: .B \-n ! 107: Arrange (by giving the output file a 0410 "magic number") that ! 108: when the output file is executed, ! 109: the text portion will be read-only and shared ! 110: among all users executing the file. ! 111: This involves moving the data areas up to the first ! 112: possible 64K byte boundary following the ! 113: end of the text ! 114: (not really useful yet). ! 115: .TP ! 116: .B \-o ! 117: The ! 118: .I name ! 119: argument after ! 120: .B \-o ! 121: is used as the name of the ! 122: .I ld68 ! 123: output file, instead of ! 124: .BR b.out . ! 125: .TP ! 126: .B \-q ! 127: Quicksort symbols in ! 128: .BR b.out ! 129: in ascending numerical order. ! 130: .TP ! 131: .B \-r ! 132: Generate relocation bits in the output file ! 133: so that it can be the subject of another ! 134: .I ld68 ! 135: run. ! 136: This flag also prevents final definitions from being ! 137: given to common symbols, ! 138: and suppresses the `undefined symbol' diagnostics. ! 139: .TP ! 140: .B \-S ! 141: `Strip' the output by removing all symbols except locals and globals. ! 142: .TP ! 143: .B \-s ! 144: `Strip' the output, that is, remove the symbol table ! 145: and relocation bits to save space (but impair the ! 146: usefulness of the debuggers). ! 147: This information can also be removed by ! 148: .IR strip (1). ! 149: .TP ! 150: .B \-T ! 151: The next argument is a hexadecimal number which sets the text segment origin. ! 152: The default origin is 0x1000. ! 153: If you intend to use the output as input to another run of ! 154: ld68, you must specify -T 0. ! 155: .TP ! 156: .B \-B ! 157: The next argument is a hexadecimal number which sets the common/bss segment ! 158: origin. The default origin is immediately after the data segment. ! 159: .TP ! 160: .B \-u ! 161: Take the following argument as a symbol and enter ! 162: it as undefined in the symbol table. This is useful ! 163: for loading wholly from a library, since initially the symbol ! 164: table is empty and an unresolved reference is needed ! 165: to force the loading of the first routine. ! 166: .TP ! 167: .B \-X ! 168: Save local symbols ! 169: except for those whose names begin with `L'. ! 170: This option is used by ! 171: .IR cc (1) ! 172: to discard internally-generated labels while ! 173: retaining symbols local to routines. ! 174: .TP ! 175: .B \-x ! 176: Do not preserve local ! 177: (non-.globl) symbols in the output symbol table; only enter ! 178: external symbols. ! 179: This option saves some space in the output file. ! 180: .SH FILES ! 181: .ta \w'/usr/local/lib/lib*.a\ \ 'u ! 182: /usr/sun/lib/lib*.a libraries ! 183: .br ! 184: b.out output file ! 185: .SH "SEE ALSO" ! 186: ar(1), cc68(1), a68(1) ! 187: .SH BUGS ! 188: The b.out format header does not contain any indication of the ! 189: text segment origin, so if you specify something other than ! 190: the default origin -T 1000, you will have to remember this ! 191: value and specify it again to dl68 when you download. The ! 192: standard Sun monitor cannot netload files with origins other ! 193: than 1000, so you must either use dl68 or write a special ! 194: loader for such programs.
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.