|
|
1.1 ! root 1: .pa 1 ! 2: .he 'A.OUT (V)'3/15/72'A.OUT (V)' ! 3: .ti 0 ! 4: .nf ! 5: NAME a.out -- assembler and link editor output ! 6: .fi ! 7: .sp ! 8: .ti 0 ! 9: DESCRIPTION ! 10: .br ! 11: .in 8 ! 12: a.out_____ ! 13: is the output file of the assembler as__ and the link editor ld__. ! 14: In both cases, a.out_____ may be executed provided there ! 15: were no errors and no unresolved external references. ! 16: .sp ! 17: This file has four sections: ! 18: a header, the program and data text, a symbol table, and relocation bits ! 19: (in that order). ! 20: The last two may be empty ! 21: if the program was loaded ! 22: with the "-s" option ! 23: of ld__ or if the symbols and relocation have been ! 24: removed by strip_____. ! 25: ! 26: The header always contains 8 words: ! 27: ! 28: .in +6 ! 29: .ti -3 ! 30: 1 A magic number (407(8)) ! 31: .ti -3 ! 32: 2 The size of the program text segment ! 33: .ti -3 ! 34: 3 The size of the initialized data segment ! 35: .ti -3 ! 36: 4 The size of the uninitialized (bss) segment ! 37: .ti -3 ! 38: 5 The size of the symbol table ! 39: .ti -3 ! 40: 6 The entry location (always 0 at present) ! 41: .ti -3 ! 42: 7 The stack size required (0 at present) ! 43: .ti -3 ! 44: 8 A flag indicating relocation bits have been suppressed ! 45: ! 46: .in -6 ! 47: The sizes of each segment are in bytes but are even. ! 48: The size of the header is not included in any of the other sizes. ! 49: ! 50: When a file produced by the assembler or loader is ! 51: loaded into core for execution, three segments are ! 52: set up: the text segment, the data segment, ! 53: and the bss (uninitialized data) segment, ! 54: in that order. ! 55: The text segment begins at the lowest ! 56: location in the core image; the header is not loaded. ! 57: The data segment begins immediately after the text ! 58: segment, and the bss segment immediately after ! 59: the data segment. ! 60: The bss segment is initialized by 0's. ! 61: In the future the text segment will be write-protected ! 62: and shared. ! 63: ! 64: The start of the text segment in the file is 20(8); ! 65: the start of the data segment is 20+S9t8 (the size of the text) ! 66: the start of the relocation information is 20+S9t8+S9d8; ! 67: the start of the symbol table is 20+2(S9t8+S9d8) if the ! 68: relocation information is present, 20+S9t8+S9d8 if not. ! 69: ! 70: The symbol table consists of 6-word entries. The first ! 71: four contain the ASCII name of the symbol, null-padded. ! 72: The next word is a flag indicating the type of symbol. ! 73: The following values are possible: ! 74: ! 75: 00 undefined symbol ! 76: 01 absolute symbol ! 77: 02 text segment symbol ! 78: 03 data segment symbol ! 79: 04 bss segment symbol ! 80: 40 undefined external (.globl) symbol ! 81: 41 absolute external symbol ! 82: 42 text segment external symbol ! 83: 43 data segment external symbol ! 84: 44 bss segment external symbol ! 85: ! 86: Values other than those given above may ! 87: occur if the user has defined some of his own instructions. ! 88: ! 89: The last word of a symbol table entry contains the value of the symbol. ! 90: ! 91: If the symbol's type is undefined external, ! 92: and the value field is non-zero, ! 93: the symbol is interpreted by the loader ld__ as ! 94: the name of a common region ! 95: whose size is indicated by the value of the ! 96: symbol. ! 97: ! 98: The value of a word in the text or data portions which is not ! 99: a reference to an undefined external symbol ! 100: is exactly that value which will appear in core ! 101: when the file is executed. ! 102: If a word in the text or data portion ! 103: involves a reference to an undefined external symbol, ! 104: as indicated by the relocation bits ! 105: for that word, ! 106: then the value of the word as stored in the file ! 107: is an offset from the associated external symbol. ! 108: When the file is processed by the ! 109: link editor and the external symbol becomes ! 110: defined, the value of the symbol will ! 111: be added into the word in the file. ! 112: ! 113: If relocation ! 114: information is present, it amounts to one word per ! 115: word of program text or initialized data. ! 116: There is no relocation information if the "suppress relocation" ! 117: flag in the header is on. ! 118: ! 119: Bits 3-1 of a relocation word indicate the segment referred ! 120: to by the text or data word associated with the relocation ! 121: word: ! 122: ! 123: .in +6 ! 124: .ti -4 ! 125: 00 indicates the reference is absolute ! 126: .ti -4 ! 127: 02 indicates the reference is to the text segment ! 128: .ti -4 ! 129: 04 indicates the reference is to the data segment ! 130: .ti -4 ! 131: 06 indicates the reference is to the bss segment ! 132: .ti -4 ! 133: 10 indicates the reference is to an undefined external symbol. ! 134: ! 135: .in -6 ! 136: Bit 0 of the relocation word indicates if on__ that the ! 137: reference is relative to the pc (e.g. "clr x"); ! 138: if off___, the reference is to the actual symbol (e.g., ! 139: "clr *$x"). ! 140: ! 141: The remainder of the relocation word (bits 15-4) ! 142: contains a symbol number in the case of external ! 143: references, and is unused otherwise. ! 144: The first symbol is numbered 0, the second 1, etc. ! 145: .sp ! 146: .in 16 ! 147: .ti 0 ! 148: SEE ALSO as__, ! 149: .ul ! 150: ld, strip, nm, un(I)
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.