COMPILATION LISTING OF SEGMENT get_relinfo_ Compiled by: Multics PL/I Compiler, Release 28e, of February 14, 1985 Compiled at: Honeywell Multics Op. - System M Compiled on: 07/16/86 0854.6 mst Wed Options: optimize map 1 /****^ *********************************************************** 2* * * 3* * Copyright, (C) Honeywell Information Systems Inc., 1982 * 4* * * 5* * Copyright (c) 1978 by Massachusetts Institute of * 6* * Technology and Honeywell Information Systems, Inc. * 7* * * 8* * Copyright (c) 1972 by Massachusetts Institute of * 9* * Technology and Honeywell Information Systems, Inc. * 10* * * 11* *********************************************************** */ 12 13 14 15 /****^ HISTORY COMMENTS: 16* 1) change(85-09-24,Elhard), approve(85-09-24,MCR7198), 17* audit(86-06-30,Weaver), install(86-07-16,MR12.0-1094): 18* Improved documentation and remove nonstandard object segment support. 19* END HISTORY COMMENTS */ 20 21 /* format: style3,^indnoniterdo */ 22 get_relinfo_: 23 procedure (argp); 24 25 /**********************************************************************/ 26 /* */ 27 /* Name: get_relinfo_ */ 28 /* Input: none */ 29 /* Function: returns the word_offset, halfword identifier, */ 30 /* and relocation type of the next non-absolute */ 31 /* halfword in the current blcok of relocation */ 32 /* info. The current relocation block and the last */ 33 /* halfword returned are maintained in static */ 34 /* storage. Expanded_absolute relocation bits are */ 35 /* also skipped over. get_relinfo_$init must be */ 36 /* called prior to calling get_relinfo_ to initiate */ 37 /* the sequential search through the specified block */ 38 /* of relocation information. */ 39 /* Output: word_offset, halfword_selector, relocation_code */ 40 /* */ 41 /**********************************************************************/ 42 43 /* Initially coded by M. J. Spier on 24 August 1970 44*Completely re-written for efficiency by M. B. Weaver on 21 November 1972 */ 45 /* modified Sept 1978 by David Spector to correct precision declarations */ 46 47 declare type fixed bin; 48 declare j fixed bin (19); 49 50 declare i fixed bin (19) int static; 51 declare nhwords fixed bin (19) aligned int static; 52 declare bitcount fixed bin (24) int static; 53 declare baseptr pointer int static; 54 declare symb (0:15) char (8) aligned int static 55 initial ("text ", "negtext ", "lnk18 ", "neglnk18", "lnk15 ", "def ", "symb ", 56 "negsymb ", "int18 ", "int15 ", "selfrel ", "unused ", "unused ", "unused ", 57 "exp_abs ", "escape "); 58 59 declare (ap, argp) pointer; 60 61 declare (addr, bin, divide, index, substr) 62 builtin; 63 64 declare relsection bit (bitcount) based (baseptr); 65 66 declare 1 arg aligned based (ap), 67 2 offset fixed bin, 68 2 side char (3) aligned, 69 2 relinfo char (8) aligned; 70 71 declare 1 word aligned based, 72 2 pad bit (35) unaligned, 73 2 odd bit (1) unaligned; 74 75 /* */ 76 77 ap = argp; /* copy argument */ 78 loop: 79 j = index (substr (relsection, i), "1"b); /* find next non-abs rel bit */ 80 if j = 0 81 then do; /* no more rel bits for this section */ 82 arg.relinfo = "overflow"; 83 go to fill_loc; /* return location info of last call */ 84 end; 85 86 i = i + j + 4; /* set bit counter after current half word info */ 87 /* find type of relocation */ 88 type = bin (substr (relsection, i - 4, 4), 4); 89 90 if type = 14 91 then do; /* have expanded absolute */ 92 nhwords = nhwords + j + bin (substr (relsection, i, 10), 10) - 1; 93 /* just skipping over */ 94 /* determine number of half words to skip */ 95 i = i + 10; /* skip bit counter 10 more in this case */ 96 go to loop; /* don't have real relocation info yet */ 97 end; 98 else nhwords = nhwords + j; /* update half word count */ 99 100 /* fill in return info */ 101 102 arg.relinfo = symb (type); /* fill in type indicator */ 103 fill_loc: 104 if addr (nhwords) -> word.odd 105 then arg.side = "lhe"; 106 else arg.side = "rhe"; /* get word offset */ 107 arg.offset = divide (nhwords - 1, 2, 17, 0); 108 109 return; 110 111 /* */ 112 113 init: 114 entry (rel_base); 115 116 /**********************************************************************/ 117 /* */ 118 /* Name: get_relinfo_$init */ 119 /* Input: rel_base */ 120 /* Function: initializes a static pointer to the beginning of */ 121 /* the string of relocation bits, saves the bitcount */ 122 /* in static storage and sets the word position */ 123 /* counter (nhwords) to zero and sets the bit string */ 124 /* index (i) to the start of the bit string. */ 125 /* Output: none */ 126 /* */ 127 /**********************************************************************/ 128 129 declare rel_base pointer; 130 131 declare 1 relinfo aligned based (rel_base), 132 2 decl_vers fixed bin, 133 2 n_bits fixed bin, 134 2 bits bit (0 refer (relinfo.n_bits)); 135 136 /* initialize counters */ 137 i = 1; /* current index into rel bit string */ 138 nhwords = 0; /* # of half words covered so far */ 139 140 bitcount = relinfo.n_bits; 141 baseptr = addr (relinfo.bits); 142 143 return; 144 145 146 147 end get_relinfo_; SOURCE FILES USED IN THIS COMPILATION. LINE NUMBER DATE MODIFIED NAME PATHNAME 0 07/16/86 0848.0 get_relinfo_.pl1 >spec>install>1094>get_relinfo_.pl1 NAMES DECLARED IN THIS COMPILATION. IDENTIFIER OFFSET LOC STORAGE CLASS DATA TYPE ATTRIBUTES AND REFERENCES (* indicates a set context) NAMES DECLARED BY DECLARE STATEMENT. addr builtin function dcl 61 ref 103 141 ap 000102 automatic pointer dcl 59 set ref 77* 82 102 103 106 107 arg based structure level 1 dcl 66 argp parameter pointer dcl 59 ref 22 77 baseptr 000014 internal static pointer dcl 53 set ref 78 88 92 141* bin builtin function dcl 61 ref 88 92 bitcount 000012 internal static fixed bin(24,0) dcl 52 set ref 78 88 92 140* bits 2 based bit level 2 dcl 131 set ref 141 divide builtin function dcl 61 ref 107 i 000010 internal static fixed bin(19,0) dcl 50 set ref 78 86* 86 88 92 95* 95 137* index builtin function dcl 61 ref 78 j 000101 automatic fixed bin(19,0) dcl 48 set ref 78* 80 86 92 98 n_bits 1 based fixed bin(17,0) level 2 dcl 131 ref 140 141 nhwords 000011 internal static fixed bin(19,0) dcl 51 set ref 92* 92 98* 98 103 107 138* odd 0(35) based bit(1) level 2 packed unaligned dcl 71 ref 103 offset based fixed bin(17,0) level 2 dcl 66 set ref 107* rel_base parameter pointer dcl 129 ref 113 140 141 relinfo 2 based char(8) level 2 in structure "arg" dcl 66 in procedure "get_relinfo_" set ref 82* 102* relinfo based structure level 1 dcl 131 in procedure "get_relinfo_" relsection based bit unaligned dcl 64 ref 78 88 92 side 1 based char(3) level 2 dcl 66 set ref 103* 106* substr builtin function dcl 61 ref 78 88 92 symb 000000 constant char(8) initial array dcl 54 ref 102 type 000100 automatic fixed bin(17,0) dcl 47 set ref 88* 90 102 word based structure level 1 dcl 71 NAMES DECLARED BY EXPLICIT CONTEXT. fill_loc 000153 constant label dcl 103 ref 83 get_relinfo_ 000051 constant entry external dcl 22 init 000172 constant entry external dcl 113 loop 000062 constant label dcl 78 ref 96 THERE WERE NO NAMES DECLARED BY CONTEXT OR IMPLICATION. STORAGE REQUIREMENTS FOR THIS PROGRAM. Object Text Link Symbol Defs Static Start 0 0 246 264 213 256 Length 434 213 16 133 32 6 BLOCK NAME STACK SIZE TYPE WHY NONQUICK/WHO SHARES STACK FRAME get_relinfo_ 69 external procedure is an external procedure. STORAGE FOR INTERNAL STATIC VARIABLES. LOC IDENTIFIER BLOCK NAME 000010 i get_relinfo_ 000011 nhwords get_relinfo_ 000012 bitcount get_relinfo_ 000014 baseptr get_relinfo_ STORAGE FOR AUTOMATIC VARIABLES. STACK FRAME LOC IDENTIFIER BLOCK NAME get_relinfo_ 000100 type get_relinfo_ 000101 j get_relinfo_ 000102 ap get_relinfo_ THE FOLLOWING EXTERNAL OPERATORS ARE USED BY THIS PROGRAM. return ext_entry index_bs_1_eis NO EXTERNAL ENTRIES ARE CALLED BY THIS PROGRAM. NO EXTERNAL VARIABLES ARE USED BY THIS PROGRAM. LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC 22 000046 77 000056 78 000062 80 000102 82 000103 83 000107 86 000110 88 000113 90 000121 92 000123 95 000137 96 000141 98 000142 102 000144 103 000153 106 000161 107 000163 109 000167 113 000170 137 000177 138 000202 140 000203 141 000210 143 000212 ----------------------------------------------------------- Historical Background This edition of the Multics software materials and documentation is provided and donated to Massachusetts Institute of Technology by Group BULL including BULL HN Information Systems Inc. as a contribution to computer science knowledge. This donation is made also to give evidence of the common contributions of Massachusetts Institute of Technology, Bell Laboratories, General Electric, Honeywell Information Systems Inc., Honeywell BULL Inc., Groupe BULL and BULL HN Information Systems Inc. to the development of this operating system. Multics development was initiated by Massachusetts Institute of Technology Project MAC (1963-1970), renamed the MIT Laboratory for Computer Science and Artificial Intelligence in the mid 1970s, under the leadership of Professor Fernando Jose Corbato. Users consider that Multics provided the best software architecture for managing computer hardware properly and for executing programs. Many subsequent operating systems incorporated Multics principles. Multics was distributed in 1975 to 2000 by Group Bull in Europe , and in the U.S. by Bull HN Information Systems Inc., as successor in interest by change in name only to Honeywell Bull Inc. and Honeywell Information Systems Inc. . ----------------------------------------------------------- Permission to use, copy, modify, and distribute these programs and their documentation for any purpose and without fee is hereby granted,provided that the below copyright notice and historical background appear in all copies and that both the copyright notice and historical background and this permission notice appear in supporting documentation, and that the names of MIT, HIS, BULL or BULL HN not be used in advertising or publicity pertaining to distribution of the programs without specific prior written permission. Copyright 1972 by Massachusetts Institute of Technology and Honeywell Information Systems Inc. Copyright 2006 by BULL HN Information Systems Inc. Copyright 2006 by Bull SAS All Rights Reserved