COMPILATION LISTING OF SEGMENT int_link_ Compiled by: Multics PL/I Compiler, Release 33e, of October 6, 1992 Compiled at: CGI Compiled on: 2000-04-17_1937.41_Mon_mdt Options: optimize map 1 /****^ *********************************************************** 2* * * 3* * Copyright, (C) Honeywell Information Systems Inc., 1982 * 4* * * 5* *********************************************************** */ 6 7 8 /****^ HISTORY COMMENTS: 9* 1) change(85-09-24,Elhard), approve(85-09-24,MCR7198), 10* audit(86-06-30,Weaver), install(86-07-16,MR12.0-1094): 11* Improved documentation, removed red/black shifts, changed errname to use 12* the caller-supplied name instead of "binder_", removed obsolete 13* nonstandard object support, modified to update the link_regeneration_table 14* with a flag ("777777"b3) to indicate internal link resolution. 15* END HISTORY COMMENTS */ 16 17 18 /* format: style3,^indnoniterdo */ 19 20 /* ****************************************************** 21* * * 22* * * 23* * Copyright (c) 1972 by Massachusetts Institute of * 24* * Technology and Honeywell Information Systems, Inc. * 25* * * 26* * * 27* ****************************************************** */ 28 29 30 /**********************************************************************/ 31 /* */ 32 /* Name: int_link_ */ 33 /* Input: argument_pointer */ 34 /* Function: given a pointer to an external_ref structure */ 35 /* (argument_pointer), determine whether the target */ 36 /* of the reference is in a component of the bound */ 37 /* object segment and perform the pre-linking. The */ 38 /* determination is done in the following manner: */ 39 /* -- if the dont_prelink flag is on in the */ 40 /* external_ref structure, just return since */ 41 /* this must remain external. */ 42 /* -- for type 3, 4, 5, or 6 links, determine */ 43 /* whether the entryname is in the segname */ 44 /* table (type 1 have no segname, they are */ 45 /* self-references). If the component is not */ 46 /* found an external link must be regenerated. */ 47 /* -- for type 4, 5, or 6 links, scan the insym */ 48 /* list for the target component to find the */ 49 /* target definition (type 1 and 3 links do not */ 50 /* refer to a definition but to the base of a */ 51 /* section/component). If the definition is not */ 52 /* found, display a message indicating that the */ 53 /* target could not be found and enter the name */ 54 /* into the oddname table to prevent duplicate */ 55 /* messages. */ 56 /* -- if the reference is a type 1 or type 5 ref */ 57 /* to the static section and we have a separate */ 58 /* static section, generate an external link */ 59 /* since we don't know where the static section */ 60 /* will be. */ 61 /* -- if the reference is a type 1 reference to */ 62 /* the static section, relocate the reference, */ 63 /* adjust the instruction, and return. */ 64 /* -- if the reference is a type 1 link to the */ 65 /* text section, relocate it, patch the */ 66 /* instruction and return. */ 67 /* -- if the reference is a type 1 link to a */ 68 /* different section, create a repatch table */ 69 /* entry for it to be filled in later since we */ 70 /* don't know where the other stuff will be, */ 71 /* patch the instruction and return. */ 72 /* -- if the target of the link is to the static */ 73 /* section of another component, we transform */ 74 /* the link into a type 1 link to *static by */ 75 /* adjusting the external_ref structure and */ 76 /* then returning so that the call to ext_link_ */ 77 /* will generate the type 1 link. */ 78 /* -- if the link has an indirect modifier, and */ 79 /* the compiler is "PASCAL", and the target of */ 80 /* the link refers to the linkage section, then */ 81 /* we have an indirect reference to a link in */ 82 /* another component. This is resolved by */ 83 /* removing the indirection and changing the */ 84 /* instruction to refer directly to the target */ 85 /* link. We then call int_link_ recursively */ 86 /* to try to resolve that link internally. If */ 87 /* that fails, we call ext_link_ to generate */ 88 /* it externally. */ 89 /* -- if the links has a modifier and the */ 90 /* instruction has other than a simple */ 91 /* indirection modifier, then generate an */ 92 /* external link and print a message indicating */ 93 /* that this link cannot be resolved internally */ 94 /* -- now the link is resolved depending on the */ 95 /* target section of the referenced definition. */ 96 /* The following procedures are used for the */ 97 /* different sections: */ 98 /* -- Text section */ 99 /* The definition value is relocated, the */ 100 /* instruction word is patched, and the */ 101 /* modifier from the link is copied into */ 102 /* the instruction. */ 103 /* -- Linkage section */ 104 /* If the reference is within the static */ 105 /* storage portion of the linkage section, */ 106 /* (ie. an ALM segdef), the definition */ 107 /* value is relocated, the instruction */ 108 /* word is patched, and the modifier from */ 109 /* the link copied into the instruction */ 110 /* modifier. Otherwise an error message */ 111 /* is printed indicating that an illegal */ 112 /* sequence into the linkage section was */ 113 /* found. */ 114 /* -- Symbol section */ 115 /* The symbol relocation is calculated and */ 116 /* a repatch table entry for the halfword */ 117 /* is generated and the instruction is */ 118 /* patched and the modifier copied. */ 119 /* -- Static section */ 120 /* Since by this point we know we are not */ 121 /* creating a separate static section, we */ 122 /* adjust the static section reference for */ 123 /* the linkage header, and then treat as a */ 124 /* segdef in the linkage section. */ 125 /* Output: none */ 126 /* */ 127 /**********************************************************************/ 128 129 /* Designed and initially coded by Michael J. Spier, October 6, 1970 */ 130 /* modified June, July 1975 by M. Weaver for separate static */ 131 /* modified 9/78 by David Spector for hash coding "snt" */ 132 /* modified Dec 78 by David Spector to make repatch table automatically extensible */ 133 134 /* modified Oct 80 by JMAthane to allow relocation of reference to PASCAL REF variables 135* and internal text references through link section */ 136 /* modified October 1983 by Melanie Weaver to fix *text relocation and add error message to above */ 137 138 int_link_: 139 procedure (argument_pointer, result); 140 141 declare argument_pointer pointer, 142 result bit (1) aligned; 143 144 145 /* DECLARATION OF EXTERNAL SYMBOLS */ 146 147 declare com_err_ external entry options (variable); 148 declare ioa_ external entry options (variable); 149 declare temp_mgr_$allocate ext entry (fixed bin); 150 declare temp_mgr_$reserve ext entry (ptr); 151 dcl ext_link_ entry (ptr); 152 dcl decode_link_ entry (ptr) returns (bit (1)); 153 154 /* DECLARATION OF INTERNAL STATIC VARIABLES */ 155 156 declare (text_relocation, symbol_relocation) 157 fixed bin internal static; 158 declare errname char (16) aligned internal static; 159 declare internally_resolved bit (18) static options (constant) init ("777777"b3); 160 161 /* DECLARATION OF AUTOMATIC STORAGE VARIABLES */ 162 163 declare (i, val, type, ndefs, class, toffset, value, expression, link_modifier, int_limit) 164 fixed bin (18); 165 declare hash_index fixed bin (34); 166 declare hash_ptr ptr; 167 declare pos fixed bin; 168 declare wnpt fixed bin; 169 declare lrt_index fixed bin; 170 declare force_retain bit (1) aligned; 171 declare (p, refp, ap, ip, dp, targp) 172 pointer; 173 declare modp pointer; 174 declare string char (33) aligned; 175 declare wsegname char (32) aligned; 176 declare wentryname char (256) aligned; 177 declare oddname char (65) aligned; 178 declare estring char (257) aligned based (addr (ebit)); 179 declare ebit bit (2340) aligned init ("0"b); 180 /* will be acc string */ 181 dcl my_result bit (1) aligned; 182 dcl 1 my_ext aligned like external_ref; 183 184 /* DECLARATION OF BUILTIN FUNCTIONS */ 185 186 declare (addr, addrel, bin, bit, fixed, hbound, min, mod, null, rel, substr, unspec) 187 builtin; 188 declare size builtin; 189 190 /* DECLARATION OF BASED STRUCTURES */ 191 192 declare 1 ext aligned based (ap) like external_ref; 193 declare 1 insyme aligned based (dp) like is; 194 declare 1 word aligned based, 195 2 lhe18 bit (18) unaligned, 196 2 rhe18 bit (18) unaligned; 197 declare 1 instr aligned based, 198 2 dum1 bit (3) unaligned, 199 2 lhe15 bit (15) unaligned, 200 2 op_code bit (9) unaligned, 201 2 dum2 bit (2) unaligned, 202 2 bit29 bit (1) unaligned, 203 2 modifier bit (6) unaligned; 204 declare 1 modifier_overlay aligned based (modp), 205 2 dum bit (30) unaligned, 206 2 tm bit (2) unaligned, 207 2 td bit (4) unaligned; 208 declare 1 b5 aligned based (p), 209 2 dum bit (21) unaligned, 210 2 rhe15 bit (15) unaligned; 211 212 213 /* */ 1 1 1 2 /* the following is include file extref.incl.pl1 */ 1 3 1 4 1 5 /****^ HISTORY COMMENTS: 1 6* 1) change(85-09-24,Elhard), approve(85-09-24,MCR7198), 1 7* audit(86-06-30,Weaver), install(86-07-16,MR12.0-1094): 1 8* changed to be a complete structure rather than a starting with a level 2 1 9* variable. 1 10* END HISTORY COMMENTS */ 1 11 1 12 declare 1 external_ref aligned based, 1 13 2 compent_ptr pointer, /* pointer to referencing component's entry */ 1 14 2 ref_ptr pointer, /* pointer to referencing textword */ 1 15 2 offset fixed bin(18), /* offset of referencing instruction in text */ 1 16 2 side char(3) aligned, /* 'rhe' or 'lhe' for referencing halfword */ 1 17 2 relinfo char(8) aligned, /* symbolic relocation information */ 1 18 2 section char(4) aligned, /* referencing section of object */ 1 19 2 loffset fixed bin, /* link's offset in linkage section */ 1 20 2 segname char(33) aligned, /* segname part of external name */ 1 21 2 slng fixed bin, /* length of preceeding ACC string (incl count) */ 1 22 2 entryname char(257) aligned, /* entry part of external name */ 1 23 2 elng fixed bin, /* length of preceeding ACC string (incl count) */ 1 24 2 type bit(18) unaligned, /* type of link */ 1 25 2 trap bit(18) unaligned, /* trap before link if non-zero */ 1 26 2 expr bit(18) unaligned, /* the expression value */ 1 27 2 code15 bit(18) unaligned, /* if type of link is 1 or 5, this is the segbase code */ 1 28 2 dont_prelink bit(1) unaligned, /* if = "1" then dont snap internal link */ 1 29 2 link_tm bit(2) unaligned, /* the original link's TM modifier */ 1 30 2 link_td bit(4) unaligned, /* the original link's TD modifier */ 1 31 2 dont_relocate bit (1) unaligned, /* "1"b -> no referencing instruction */ 1 32 2 padding(2) fixed bin; /* to isolate from other variables */ 214 215 216 /* */ 2 1 /**** START OF: bindext.incl.pl1 * * * * * */ 2 2 2 3 2 4 /****^ HISTORY COMMENTS: 2 5* 1) change(86-06-14,Elhard), approve(86-06-14,MCR7198), 2 6* audit(86-06-30,Weaver): 2 7* Added declarations for bx_$caller and bx_$temp_bsegp. 2 8* END HISTORY COMMENTS */ 2 9 2 10 /* DECLARATION OF BINDER'S MAIN DATABASE */ 2 11 2 12 /* include file bindext.incl.pl1 */ 2 13 2 14 /* Modified Sept 1978 by David Spector for using "get_temp_segment_" in temp_mgr_ */ 2 15 /* Modified Dec 1978 by David Spector for making repatch table automatically extensible */ 2 16 /* Modified 01/15/81 W. Olin Sibert for new options */ 2 17 2 18 declare bx_$vers_name char (168) aligned external; /* ASCII version name, in ACC form */ 2 19 declare bx_$vers_number fixed bin external; /* integer part of version number */ 2 20 declare bx_$size fixed bin external; /* size of main data base, for resetting */ 2 21 declare bx_$snt_limit fixed bin external; /* preset limit for segname table */ 2 22 declare bx_$oddname_limit fixed bin external; /* preset limit for oddname table */ 2 23 declare bx_$stringmap_limit fixed bin external; /* preset limit for stringmap table */ 2 24 declare bx_$addname_limit fixed bin external; /* preset limit for addname table */ 2 25 declare bx_$area_begin fixed bin (18) external; /* beginning of main data base */ 2 26 declare bx_$ctp pointer external; /* pointer to component table */ 2 27 declare bx_$freep pointer external; /* pointer to beginning of free area */ 2 28 declare bx_$isp pointer external; /* pointer to first insym table */ 2 29 declare bx_$inpp pointer external; /* pointer to binder's input structure */ 2 30 declare bx_$bsegp pointer external; /* pointer to base of new object segment */ 2 31 declare bx_$temp pointer external; /* pointer to threaded list of temp segments */ 2 32 declare bx_$optp pointer external; /* pointer to options table */ 2 33 declare bx_$odnp pointer external; /* pointer to oddname table */ 2 34 declare bx_$first_rptp pointer external; /* pointer to first chunk of repatch table */ 2 35 declare bx_$last_rptp pointer external; /* pointer to current chunk of threaded repatch table */ 2 36 declare bx_$adnp pointer external; /* pointer to addname table */ 2 37 declare bx_$bindmap_def pointer external; /* pointer to new object's "bind_map" definition */ 2 38 declare bx_$bdefp pointer external; /* pointer to new object's definition section */ 2 39 declare bx_$bstatp pointer external; /* pointer to new object's static section */ 2 40 declare bx_$blnkp pointer external; /* pointer to new object's linkage section */ 2 41 declare bx_$bsymp pointer external; /* pointer to new object's symbol section */ 2 42 declare bx_$sntp pointer external; /* pointer to segname table */ 2 43 declare bx_$tdefp pointer external; /* pointer to temporary new definition section */ 2 44 declare bx_$tintp pointer external; /* pointer to temporary new internal static */ 2 45 declare bx_$tlinkp pointer external; /* pointer to temporary new linkage section */ 2 46 declare bx_$strmp pointer external; /* pointer to stringmap table */ 2 47 declare bx_$n_firstrefs fixed bin external; /* count of components with firstref traps */ 2 48 declare bx_$bound_segname char (32) aligned external; /* name of new bound object */ 2 49 declare bx_$fatal_error fixed bin external; /* 1 -> fatal error was detected */ 2 50 declare bx_$bseg_acinfop pointer external; /* new object's acinfop for "tssi_" */ 2 51 declare bx_$bseg_bitcount fixed bin (24) external; /* new object's bitcount */ 2 52 declare bx_$o_lng fixed bin (19) external; /* length of new bound object */ 2 53 declare bx_$t_lng fixed bin (18) external; /* length of new text section */ 2 54 declare bx_$d_lng fixed bin (18) external; /* length of new definition section */ 2 55 declare bx_$i_lng fixed bin external; /* length of new static section */ 2 56 declare bx_$l_lng fixed bin external; /* length of new linkage section */ 2 57 declare bx_$s_lng fixed bin (18) external; /* length of new symbol section */ 2 58 declare bx_$addname fixed bin external; /* 1 -> addname option specified */ 2 59 declare bx_$debug fixed bin external; /* 1 -> debug option was specified */ 2 60 declare bx_$brief fixed bin external; /* 1 -> brief option was specified */ 2 61 declare bx_$force_order fixed bin external; /* 1 -> -force_order specified on command line */ 2 62 declare bx_$has_sep_stat fixed bin external; /* 1 -> a comp has nonzero sep static */ 2 63 declare bx_$has_comb_stat fixed bin external; /* 1 -> a comp has nonzero combined static */ 2 64 declare bx_$bound_sep_stat fixed bin external; /* 1 -> bound segment has separate static */ 2 65 declare bx_$perprocess_static fixed bin external; /* 1 -> bound segment has perprocess static switch on */ 2 66 declare bx_$standard fixed bin external; /* 1 -> bound seg is in standard format */ 2 67 declare bx_$bproc fixed bin external; /* 1 -> at least one component is a procedure */ 2 68 declare bx_$textlng fixed bin (18) external; /* length of new pure text portion */ 2 69 declare bx_$curdeflng fixed bin (18) external; /* current length of new definition section */ 2 70 declare bx_$tintlng fixed bin external; /* current length of new internal static */ 2 71 declare bx_$maxlinklng fixed bin external; /* maximum size linkage section may attain */ 2 72 declare bx_$maxdeflng fixed bin (18) external; /* maximum size definition section may attain */ 2 73 declare bx_$tlinklng fixed bin external; /* current size of linkage section */ 2 74 declare bx_$ncomp fixed bin external; /* number of component objects to be bound */ 2 75 declare bx_$v_lng fixed bin external; /* length of version name string */ 2 76 declare bx_$n_lng fixed bin external; /* length of bound segment name string */ 2 77 declare bx_$nsymdefs fixed bin external; /* count of non-null symbol definitions */ 2 78 declare bx_$nsegdefs fixed bin external; /* count of non-null segment name definitions */ 2 79 declare bx_$temp_bsegp ptr external; /* pointer to the temporary bound seg in the process dir */ 2 80 declare bx_$caller char (32) aligned external; /* name of the caller of bind_ for error messages */ 2 81 2 82 /**** END OF: bindext.incl.pl1 * * * * * */ 217 218 219 /* */ 3 1 /* Include file comptbl.incl.pl1 */ 3 2 3 3 3 4 /****^ HISTORY COMMENTS: 3 5* 1) change(85-09-24,Elhard), approve(85-09-24,MCR7198), 3 6* audit(86-06-30,Weaver), install(86-07-16,MR12.0-1094): 3 7* added link_regeneration_table pointer (clrtp) to component structure. 3 8* END HISTORY COMMENTS */ 3 9 3 10 declare (ctp, ctep) pointer; 3 11 3 12 declare comp_tbl(1000) pointer based(ctp); 3 13 3 14 3 15 3 16 declare 1 comp aligned based(ctep), /* declaration of a component entry */ 3 17 2 filename char(32) aligned, /* object segment's file name */ 3 18 2 compiler char(8) aligned, /* name of compiler which produced this object */ 3 19 2 format char(8) aligned, /* format of object code (PL/1, ALM etc.) */ 3 20 3 21 2 ctxtp pointer, /* pointer to base of text section */ 3 22 2 cdefp pointer, /* pointer to definitions */ 3 23 2 cstatp pointer, /* pointer to static section */ 3 24 2 clnkp pointer, /* pointer to head of linkage section */ 3 25 2 csymp pointer, /* pointer to symbol table */ 3 26 2 cfrtp pointer, /* pointer to first ref trap array */ 3 27 2 crltp pointer, /* pointer to rel-text */ 3 28 2 crllp pointer, /* pointer to rel-link */ 3 29 2 crlsp pointer, /* pointer to rel-symb */ 3 30 2 insymentp pointer, /* pointer to this component's insym table entry */ 3 31 2 clrtp pointer, /* pointer to link_regeneration_table */ 3 32 2 unused_1 pointer, /* reserve */ 3 33 2 unused_2 pointer, /* reserve */ 3 34 2 unused_3 fixed bin, /* reserve */ 3 35 2 cindex fixed bin, /* this entry's index in table */ 3 36 2 standard_object fixed bin, /* 1 -> this object has standard format */ 3 37 2 defthread fixed bin, /* beginning of comp's definition block */ 3 38 2 fn_lng fixed bin, /* length of filename string */ 3 39 2 ignore fixed bin, /* 1->ignore erroneous entry */ 3 40 2 io_table fixed bin, /* 1 -> symbol table needed for io */ 3 41 2 table_deleted fixed bin, /* 1 -> symbol table is being deleted */ 3 42 2 separate_static fixed bin, /* 1 -> component has nonzero separate static */ 3 43 (2 defblockp, /* rel pointer to component's definition block */ 3 44 2 current_def) bit(18) unaligned, /* rel pointer to component's current def */ 3 45 2 cbitcount fixed bin(24), /* bitcount of component segment */ 3 46 2 clngt fixed bin(18), /* length of pure text section */ 3 47 2 cpadt fixed bin, /* number of added padwords for text */ 3 48 2 clngd fixed bin(18), /* length of definition section */ 3 49 2 clngi fixed bin, /* length of internal static */ 3 50 2 cpadi fixed bin, /* number of added padwords for internal static */ 3 51 2 clngs fixed bin(18), /* length of original symbol table */ 3 52 2 clngns fixed bin(18), /* length of new symb section stripped of relbits */ 3 53 2 clngss fixed bin(18), /* length of symbol section minus relbits and table */ 3 54 2 cpads fixed bin, /* padding length if section length is odd */ 3 55 2 n_sym_blks fixed bin, /* number of symbol blocks */ 3 56 3 57 2 crelt fixed bin, /* relocation value for text */ 3 58 2 creli fixed bin, /* relocation value for internal static */ 3 59 2 crels fixed bin, /* relocation value for symbol section */ 3 60 2 last_item fixed bin; /*** MUST ALWAYS BE LAST IN STRUCTURE ***/ 3 61 3 62 3 63 220 221 222 /* */ 4 1 /* Include file bndtbl.incl.pl1 */ 4 2 4 3 4 4 /****^ HISTORY COMMENTS: 4 5* 1) change(85-09-24,Elhard), approve(85-09-24,MCR7198), 4 6* audit(86-06-30,Weaver), install(86-07-16,MR12.0-1094): 4 7* Added link_regeneration_table and eliminated the use of "p" as a pointer 4 8* to base structures on.. 4 9* END HISTORY COMMENTS */ 4 10 4 11 /* DIVERSE BINDER TABLES */ 4 12 4 13 /* Modified Oct 1978 by David Spector for hash coding snt and strm */ 4 14 /* Modified Dec 1978 by David Spector for making repatch table 4 15* automatically extensible */ 4 16 4 17 declare (sntp, adnp, odnp, rptp, rptep, strmp, lrtp) pointer; 4 18 4 19 /* The SEGNAME table - segnames and synonyms of all components */ 4 20 4 21 declare 1 snt aligned based(sntp), 4 22 2 hash_table (0:210) unaligned ptr, /* prime length */ 4 23 2 max_size fixed bin, /* size limit of allocated segname table */ 4 24 2 n_names fixed bin, /* number of segname-table entries used */ 4 25 2 entry(1000) like seg; 4 26 4 27 /* declaration of a SEGNAME entry */ 4 28 4 29 declare 1 seg aligned based, /* redeclaration of a single segname */ 4 30 2 name char(33) aligned, /* segname in ACC string format */ 4 31 2 lng fixed bin, /* length of segname, incl ACC count */ 4 32 2 addname fixed bin, /* 1-> add name to bound segment */ 4 33 2 defrel bit(18), /* offset in defs of new definition */ 4 34 2 comp pointer, /* pointer to associated component table */ 4 35 2 hash_thread ptr; /* thread to next "seg" in bucket */ 4 36 4 37 4 38 /* the ADDNAME table - list of names specified by "Addname" statement */ 4 39 4 40 declare 1 an aligned based(adnp), 4 41 2 max_size fixed bin, /* size limit of addname table */ 4 42 2 n_an fixed bin, /* number of names to add */ 4 43 2 syn(1000) char(32) aligned; /* contains the names to be added */ 4 44 4 45 4 46 /* The ODDNAME table - scratchpad memory to suppress redundant error messages */ 4 47 4 48 declare 1 od aligned based(odnp), 4 49 2 max_size fixed bin, /* max size of table */ 4 50 2 n_odds fixed bin, /* current size of table */ 4 51 2 entry(1000), 4 52 3 name char(289) aligned; 4 53 4 54 4 55 /* The REPATCH table - of halfwords to be relocated at a later time */ 4 56 4 57 declare 1 rpt aligned based(rptp), 4 58 2 thread unaligned ptr, /* To next rpt (null at end) */ 4 59 2 npt fixed bin, 4 60 2 entry(1000) like rpte aligned; 4 61 4 62 4 63 declare 1 rpte aligned based(rptep), /* declaration of single repatch table entry */ 4 64 2 poffset bit(18) unaligned, /* offset into text of word to be patched */ 4 65 2 pexpr bit(18) unaligned, /* value to add to patched halfword */ 4 66 2 halfword char(3) aligned, /* designates wordhalf to be patched */ 4 67 2 pbase char(1) unaligned, /* section designator of word to be patched */ 4 68 2 code char(1) unaligned; /* code of section base to be used as patch value */ 4 69 4 70 4 71 /* The STRINGMAP table - to avoid redundant strings in definition section */ 4 72 4 73 declare 1 strm aligned based(strmp), 4 74 2 hash_table (0:862) fixed bin(17), /* prime length */ 4 75 2 max_size fixed bin, 4 76 2 nstr fixed bin, 4 77 2 entry(2048) unaligned, 4 78 3 map bit(18), /* rel pointer to string in def section */ 4 79 3 hash_thread fixed bin(17); /* index of next strm.entry in hash bucket */ 4 80 4 81 /* The LINK_REGENERATION table - to flag links which have and */ 4 82 /* have not been regenerated to insure generation of all links */ 4 83 4 84 declare 1 lrt aligned based (lrtp), 4 85 2 count fixed bin, 4 86 2 start_offset fixed bin (18) unsigned, 4 87 2 regenerated (0 refer (lrt.count)) 4 88 bit (18) unaligned; 4 89 4 90 declare UNRESOLVED bit (18) static options (constant) init ("000000"b3); 4 91 declare INTERNALLY_RESOLVED bit (18) static options (constant) init ("777777"b3); 223 224 225 /* */ 5 1 /* Include file insym.incl.pl1 */ 5 2 5 3 5 4 /****^ HISTORY COMMENTS: 5 5* 1) change(86-06-14,Elhard), approve(86-06-14,MCR7198), 5 6* audit(86-06-30,Weaver), install(86-07-16,MR12.0-1094): 5 7* Changed to eliminate the use of "p" as a pointer to base the structures 5 8* on. 5 9* END HISTORY COMMENTS */ 5 10 5 11 5 12 declare 1 insym aligned based, /* declaration of the INSYM structure */ 5 13 5 14 2 thread pointer, /* pointer to the next insym structure */ 5 15 2 n_insyms fixed bin, /* number of insym entries */ 5 16 (2 retained, /* def(s) have been retained for this component */ 5 17 2 global_nolink) bit(1) unaligned, /* don't prelink any reference to/from this object */ 5 18 2 entry(1000) like is; 5 19 5 20 declare 1 is aligned based, 5 21 (2 next_ext_ptr bit(18), /* thread to next def */ 5 22 2 trap_ptr bit(18), /* trap pointer */ 5 23 2 value bit(18), /* symbol's offset value */ 5 24 2 class bit(18)) unaligned, /* corresponding section of the object */ 5 25 2 def_offset fixed bin(18), /* offset of def in original def section */ 5 26 2 symbol char(257) aligned, /* the symbol in ACC string form */ 5 27 2 lng fixed bin, /* length in chars of ACC string (incl. ACC count) */ 5 28 2 nargs fixed bin, /* # of args expected by entry */ 5 29 2 descr_ptr pointer, /* ptr to descriptor ptr array */ 5 30 (2 null_entry, /* 1->type 3 (seg|expr) entry, no insym symbol */ 5 31 2 snapped, /* 0->not referenced, 1->link snapped */ 5 32 2 has_descr, /* 1->entry has valid descriptors */ 5 33 2 entrypoint, /* 0->segdef, 1->entrypoint; meaningful only for standard */ 5 34 2 retain_flag, /* 1->turn on retain flag; was on in original */ 5 35 2 delete, /* 1->don't regenerate this def in any case */ 5 36 2 ignore, /* 1->regenerate but ignore */ 5 37 2 regenerated, /* this definition already regenerated */ 5 38 2 retain, /* 0->don't regenerate, 1->retain definition */ 5 39 2 no_link, /* don't prelink to this symbol */ 5 40 2 duplicate) bit(1) unaligned, /* this symbol name duplicated in another block */ 5 41 2 defrel bit (18); /* offset in defs of regenerated definition */ 5 42 5 43 5 44 226 227 228 /* */ 229 230 231 ctp = bx_$ctp; 232 sntp = bx_$sntp; 233 ap = argument_pointer; /* copy argument into stack */ 234 result = "0"b; /* preset return argument */ 235 if ext.dont_prelink = "1"b 236 then return; /* ******* */ 237 p = ext.compent_ptr -> comp.insymentp; /* pointer to referencing object's definitions */ 238 force_retain = "0"b; 239 if p -> insym.global_nolink = "1"b 240 then force_retain = "1"b; /* retain referenced entry for nolink */ 241 wsegname = substr (ext.segname, 2, ext.slng - 1); 242 if ext.elng > 1 243 then wentryname = substr (ext.entryname, 2, ext.elng - 1); 244 /* copy ACC strings into regular format */ 245 else wentryname = " "; /* there is no entryname */ 246 refp = ext.ref_ptr; /* copy into stack for efficiency */ 247 ctep = ext.compent_ptr; /* copy pointer to referencing component's entry */ 248 lrtp = comp.clrtp; 249 lrt_index = ((ext.loffset - lrt.start_offset) * 0.5) + 1; 250 link_modifier = 0; 251 modp = addr (link_modifier); 252 modifier_overlay.tm = ext.link_tm; /* get modifier of original ext.link */ 253 modifier_overlay.td = ext.link_td; /* ... */ 254 val = 0; /* reset conversion variable */ 255 type = fixed (ext.type, 18); 256 257 if type = 1 258 then go to have_target; /* it's an internal type-1 link */ 259 string = ext.segname; /* copy ext.segname for efficiency */ 260 261 /* Perform hash-coded lookup of snt. */ 262 263 /* Hash-code the string (segname to be found) */ 264 265 hash_index = 0; 266 do pos = 1 to min (ext.slng, 24); /* prevent overflow of hash_index */ 267 hash_index = 2 * hash_index + bin (unspec (substr (string, pos, 1)), 9); 268 end; 269 hash_index = mod (hash_index, hbound (snt.hash_table, 1) + 1); 270 271 /* Do linear search of this hash-code "bucket" (chain of entries) for 272* entry having segname=string. */ 273 274 do hash_ptr = snt.hash_table (hash_index) repeat hash_ptr -> seg.hash_thread while (hash_ptr ^= null); 275 /* search chain of links */ 276 if hash_ptr -> seg.name = string 277 then goto segname_found; /* success */ 278 end; 279 goto return; /* failure */ 280 281 segname_found: 282 substr (estring, 1, ext.elng) = substr (ext.entryname, 1, ext.elng); 283 /* copy def for efficiency; remove substr when all names are 257 */ 284 targp = hash_ptr -> seg.comp; /* pointer to referenced component's entry */ 285 int_limit = targp -> comp.clngi + 8; /* scope of internal static */ 286 text_relocation = targp -> comp.crelt; /* relocation counter for target component */ 287 symbol_relocation = targp -> comp.crels; /* ... */ 288 ip = targp -> comp.insymentp; /* pointer to component's definitions */ 289 if ip -> insym.global_nolink = "1"b 290 then goto return; /* target component not to be prelinked */ 291 ndefs = ip -> insym.n_insyms; /* get number of defs for this component */ 292 if (type = 6 & ext.elng = 1) 293 then go to null_ent; /* treat like type 3 */ 294 if type = 3 295 then /* its a segname|expresiion,m link */ 296 do; 297 null_ent: 298 dp = addr (ip -> insym.entry (ndefs)); /* entry for null-name is the last */ 299 goto definition_found; 300 end; 301 302 /* its a type-4 or type-5 segname|entryname+expression,m link */ 303 304 else do i = 1 to ndefs - 1; /* scan definitions */ 305 dp = addr (ip -> insym.entry (i)); /* pointer to a definition entry */ 306 if estring = insyme.symbol 307 then goto definition_found; 308 end; 309 oddname = wsegname; 310 substr (oddname, ext.slng, 1) = "$"; 311 substr (oddname, ext.slng + 1, ext.elng - 1) = wentryname; 312 odnp = bx_$odnp; 313 do i = 1 to od.n_odds; /* lookup oddname table */ 314 if oddname = od.entry (i).name 315 then goto return; /* message already printed */ 316 end; 317 318 if type = 5 319 then do; 320 result = "1"b; /* this is an internal link by definition */ 321 lrt.regenerated (lrt_index) = internally_resolved; 322 i = fixed (ext.code15, 18); 323 if i = 0 324 then wsegname = "*text"; 325 else if i = 1 326 then wsegname = "*link"; 327 else if i = 2 328 then wsegname = "*symbol"; 329 else if i = 4 330 then wsegname = "*static"; 331 call com_err_ (0, errname, "cannot locate ^a|^a for file ^a", wsegname, wentryname, comp.filename); 332 bx_$fatal_error = 1; 333 end; 334 else call ioa_ ("Warning: cannot match symbol ^a; external link generated.", oddname); 335 if i = od.max_size 336 then do; 337 od.n_odds = i + 1; 338 call com_err_ (0, errname, "oddname table overflow; please notify maintenance."); 339 goto return; 340 end; 341 od.entry (i).name = oddname; /* make new entry */ 342 od.n_odds = i; 343 goto return; 344 345 definition_found: 346 if insyme.no_link = "1"b 347 then goto return; /* this symbol must not be prelinked to */ 348 if force_retain = "1"b 349 then do; 350 insyme.delete = "0"b; /* retain symbol referenced by nolink component */ 351 insyme.retain = "1"b; 352 end; 353 have_target: 354 expression = fixed (ext.expr, 18); /* get expression from link */ 355 if substr (ext.expr, 1, 1) 356 then expression = -fixed (^ext.expr, 18) - 1; 357 358 if type = 1 | type = 5 359 then do; /* check for *static */ 360 if bin (ext.code15, 18) = 4 361 then do; /* *static */ 362 if bx_$bound_sep_stat = 1 363 then return; /* addr of static not known */ 364 /* the following treatment of *static links is inconsistent 365* in that they are relocated whereas *link links are not */ 366 if type = 1 367 then do; /* must change to internal reference to static in linkage */ 368 value = 8; /* must adjust for linkage header */ 369 targp = ctep; /* selfreference */ 370 result = "1"b; 371 lrt.regenerated (lrt_index) = internally_resolved; 372 go to segdef_in_linkage; 373 end; 374 end; 375 end; 376 if type = 1 377 then /* internal link relative to sections */ 378 do; 379 result = "1"b; /* this is an internal reference */ 380 lrt.regenerated (lrt_index) = internally_resolved; 381 if wsegname = "*text" 382 then toffset = comp.crelt; /* all type-1 links relative to base of section */ 383 else do; /* reference to linkage and symbol must be done in two steps */ 384 call create_rpt_entry; /* wnpt = index of repatch table entry */ 385 rptep = addr (rpt.entry (wnpt)); 386 rpte.halfword = ext.side; 387 rpte.poffset = rel (refp); /* remember referencing instruction */ 388 rpte.pbase = "t"; /* relative to text section */ 389 rpte.pexpr = "0"b; /* no expression value */ 390 toffset = 0; /* type-1 links refer to base of section */ 391 if wsegname = "*link" 392 then /* self reference to linkage section */ 393 rpte.code = "l"; 394 else if wsegname = "*symbol" 395 then /* self reference to symbol section */ 396 rpte.code = "s"; 397 else call ioa_ ("int_link_: programming error 1;name=^a", wsegname); 398 end; 399 toffset = toffset + expression; /* put new address in referencing instruction */ 400 refp -> word.lhe18 = addr (toffset) -> word.rhe18; 401 goto patch_modifier; 402 end; 403 404 class = fixed (insyme.class, 18); /* get class of entrypoint */ 405 /* can't prelink to separate static */ 406 value = fixed (insyme.value, 18); /* get value */ 407 408 if class = 4 409 then if bx_$bound_sep_stat = 1 410 then do; /* Transform a link to another component's 411* static to a type 1 link to *static. To do 412* this we change the info in ext so that 413* ext_link_ will generate the right link. */ 414 if type = 6 415 then ext.trap = "0"b; /* target won't need to be created */ 416 ext.type = bit (bin (1, 18), 18); 417 ext.code15 = bit (bin (4, 18), 18); 418 ext.expr = bit (bin (value + targp -> comp.creli + expression, 18), 18); 419 /* keep segname and entryname for messages and to distinguish diddled structure */ 420 421 go to return; 422 423 end; 424 425 if link_modifier ^= 0 426 then do; /* the original link had a modifier in it */ 427 if comp.compiler = "PASCAL " 428 then do; 429 if link_modifier = 16 430 then do; /* 20 octal (indirect) */ 431 if class = 1 432 then do; 433 434 /* This link indirects through another link. We now want to resolve the 435* reference directly to the other link (or to its target, if internal). 436* We do this by pretending that the reference is actually to the other link. */ 437 438 refp -> instr.lhe15 = addr (value) -> rhe15; 439 my_ext.ref_ptr = ext.ref_ptr; 440 my_ext.compent_ptr = targp; 441 my_ext.loffset = value; 442 if decode_link_ (addr (my_ext)) = "1"b 443 then do; 444 call com_err_ (0, errname, "Cannot regenerate target link of indirect link ^a|^a,*", 445 wsegname, wentryname); 446 bx_$fatal_error = 1; 447 return; 448 end; 449 call int_link_ (addr (my_ext), my_result); 450 if my_result = "0"b 451 then call ext_link_ (addr (my_ext)); 452 end; 453 else if class = 4 454 then do; 455 value = value + targp -> comp.creli + 8; 456 refp -> instr.lhe15 = addr (value) -> rhe15; 457 end; 458 result = "1"b; 459 lrt.regenerated (lrt_index) = internally_resolved; 460 return; 461 end; 462 end; 463 if refp -> modifier_overlay.td ^= "0000"b 464 then /* the referencing instruction has a modifier as well */ 465 do; 466 call ioa_ ("Warning: Modifier at ^a|^o cannot be handled by binder; external link generated.", 467 comp.filename, ext.offset); 468 insyme.delete = "0"b; /* make sure def gets regenerated */ 469 insyme.retain = "1"b; 470 goto return; 471 end; 472 end; 473 474 475 result = "1"b; /* this is an internal link */ 476 lrt.regenerated (lrt_index) = internally_resolved; 477 478 if class = 0 479 then do; 480 toffset = text_relocation + value + expression; 481 goto update_reference; 482 end; 483 484 if class = 1 485 then do; 486 p = targp -> comp.clnkp; /* pointer to base of target's old linkage section */ 487 p = addrel (p, value); /* pointer to symbol's entry sequence in linkage section */ 488 if (refp -> modifier_overlay.tm = "11"b) | (value < int_limit) 489 then /* an ALM segdef */ 490 do; 491 segdef_in_linkage: 492 val = value + targp -> comp.creli + expression; 493 /* compute new address of internal static */ 494 refp -> instr.lhe15 = addr (val) -> rhe15; 495 /* and store in referencing instruction */ 496 if link_modifier = 0 497 then refp -> modifier_overlay.tm = "00"b; 498 else refp -> instr.modifier = bit (bin (link_modifier, 6), 6); 499 if type ^= 1 500 then insyme.snapped = "1"b; /* dp not defined for type 1 */ 501 goto return; 502 end; 503 504 illegal_entry: 505 call com_err_ (0, errname, "illegal ^a entry sequence in link|^o for ^a$^a", targp -> comp.compiler, value, 506 targp -> comp.filename, wentryname); 507 bx_$fatal_error = 1; 508 goto return; 509 510 end; 511 512 513 if class = 2 514 then do; 515 toffset = symbol_relocation + value + expression; 516 call create_rpt_entry; /* wnpt = index of repatch table entry */ 517 rpt.entry (wnpt).halfword = ext.side; 518 rpt.entry (wnpt).poffset = rel (refp); /* remember to finish relocation later */ 519 rpt.entry (wnpt).pbase = "t"; /* relative to text section */ 520 rpt.entry (wnpt).pexpr = "0"b; /* no expression value */ 521 rpt.entry (wnpt).code = "s"; 522 goto update_reference; 523 end; 524 525 if class = 4 526 then do; /* in static, but will be combined */ 527 value = value + 8; /* must account for linkage header */ 528 go to segdef_in_linkage; 529 end; 530 531 call com_err_ (0, errname, "internal entrypoint ^a in file ^a has unrecognized class ^o", wentryname, 532 targp -> comp.filename, class); 533 bx_$fatal_error = 1; 534 goto return; 535 536 update_reference: /* put new address in referencing instruction */ 537 refp -> word.lhe18 = addr (toffset) -> word.rhe18; 538 insyme.snapped = "1"b; 539 540 patch_modifier: 541 refp -> instr.bit29 = "0"b; 542 if link_modifier = 0 543 then refp -> modifier_overlay.tm = "00"b; /* remove indirection */ 544 else refp -> instr.modifier = bit (bin (link_modifier, 6), 6); 545 /* copy modifier from original link */ 546 goto return; 547 548 illegal_reference: 549 call com_err_ (0, errname, "illegal ^a external reference in ^a|^o", comp.compiler, comp.filename, ext.offset); 550 bx_$fatal_error = 1; 551 552 return: 553 return; 554 555 556 557 558 init: 559 entry; 560 561 if bx_$debug = 1 562 then errname = "int_link_"; 563 else errname = bx_$caller; 564 565 return; 566 567 create_rpt_entry: 568 procedure; /* wnpt = index of new repatch table entry */ 569 570 rptp = bx_$last_rptp; 571 wnpt, rpt.npt = rpt.npt + 1; 572 if wnpt = hbound (rpt.entry, 1) 573 then do; /* allocate new chunk of repatch table */ 574 call temp_mgr_$allocate (size (rpt)); 575 rpt.thread = bx_$freep; 576 rptp = bx_$freep; 577 bx_$last_rptp = rptp; 578 rpt.thread = p; 579 call temp_mgr_$reserve (addrel (rptp, size (rpt))); 580 rpt.thread = null; 581 rpt.npt = 0; 582 end; 583 584 end; 585 586 587 end; /* End of int_link_ */ SOURCE FILES USED IN THIS COMPILATION. LINE NUMBER DATE MODIFIED NAME PATHNAME 0 04/17/00 1937.4 int_link_.pl1 >udd>sm>ds>w>ml>int_link_.pl1 214 1 07/16/86 1322.1 extref.incl.pl1 >ldd>incl>extref.incl.pl1 217 2 07/16/86 1322.1 bindext.incl.pl1 >ldd>incl>bindext.incl.pl1 220 3 07/16/86 1322.1 comptbl.incl.pl1 >ldd>incl>comptbl.incl.pl1 223 4 07/16/86 1322.1 bndtbl.incl.pl1 >ldd>incl>bndtbl.incl.pl1 226 5 07/16/86 1322.1 insym.incl.pl1 >ldd>incl>insym.incl.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 186 ref 251 281 297 305 306 385 400 438 442 442 449 449 450 450 456 494 536 addrel builtin function dcl 186 ref 487 579 579 ap 000126 automatic pointer dcl 171 set ref 233* 235 237 241 241 242 242 242 246 247 249 252 253 255 259 266 281 281 281 292 310 311 311 322 353 355 355 360 386 414 416 417 418 439 466 517 548 argument_pointer parameter pointer dcl 141 ref 138 233 b5 based structure level 1 dcl 208 bin builtin function dcl 186 ref 267 360 416 417 418 498 544 bit builtin function dcl 186 ref 416 417 418 498 544 bit29 0(29) based bit(1) level 2 packed packed unaligned dcl 197 set ref 540* bx_$bound_sep_stat 000050 external static fixed bin(17,0) dcl 2-64 ref 362 408 bx_$caller 000052 external static char(32) dcl 2-80 ref 563 bx_$ctp 000032 external static pointer dcl 2-26 ref 231 bx_$debug 000046 external static fixed bin(17,0) dcl 2-59 ref 561 bx_$fatal_error 000044 external static fixed bin(17,0) dcl 2-49 set ref 332* 446* 507* 533* 550* bx_$freep 000034 external static pointer dcl 2-27 ref 575 576 bx_$last_rptp 000040 external static pointer dcl 2-35 set ref 570 577* bx_$odnp 000036 external static pointer dcl 2-33 ref 312 bx_$sntp 000042 external static pointer dcl 2-42 ref 232 class 1(18) based bit(18) level 2 in structure "insyme" packed packed unaligned dcl 193 in procedure "int_link_" ref 404 class 000104 automatic fixed bin(18,0) dcl 163 in procedure "int_link_" set ref 404* 408 431 453 478 484 513 525 531* clngi 64 based fixed bin(17,0) level 2 dcl 3-16 ref 285 clnkp 22 based pointer level 2 dcl 3-16 ref 486 clrtp 40 based pointer level 2 dcl 3-16 ref 248 code 4(09) based char(1) array level 3 in structure "rpt" packed packed unaligned dcl 4-57 in procedure "int_link_" set ref 521* code 2(09) based char(1) level 2 in structure "rpte" packed packed unaligned dcl 4-63 in procedure "int_link_" set ref 391* 394* code15 127(18) based bit(18) level 2 packed packed unaligned dcl 192 set ref 322 360 417* com_err_ 000016 constant entry external dcl 147 ref 331 338 444 504 531 548 comp 14 based pointer level 2 in structure "seg" dcl 4-29 in procedure "int_link_" ref 284 comp based structure level 1 dcl 3-16 in procedure "int_link_" compent_ptr 000404 automatic pointer level 2 in structure "my_ext" dcl 182 in procedure "int_link_" set ref 440* compent_ptr based pointer level 2 in structure "ext" dcl 192 in procedure "int_link_" ref 237 247 compiler 10 based char(8) level 2 dcl 3-16 set ref 427 504* 548* creli 74 based fixed bin(17,0) level 2 dcl 3-16 ref 418 455 491 crels 75 based fixed bin(17,0) level 2 dcl 3-16 ref 287 crelt 73 based fixed bin(17,0) level 2 dcl 3-16 ref 286 381 ctep 000542 automatic pointer dcl 3-10 set ref 247* 248 331 369 381 427 466 548 548 ctp 000540 automatic pointer dcl 3-10 set ref 231* decode_link_ 000030 constant entry external dcl 152 ref 442 delete 110(05) based bit(1) level 2 packed packed unaligned dcl 193 set ref 350* 468* dont_prelink 130 based bit(1) level 2 packed packed unaligned dcl 192 ref 235 dp 000132 automatic pointer dcl 171 set ref 297* 305* 306 345 350 351 404 406 468 469 499 538 ebit 000302 automatic bit(2340) initial dcl 179 set ref 179* 281 306 elng 125 based fixed bin(17,0) level 2 dcl 192 ref 242 242 281 281 292 311 entry 4 based structure array level 2 in structure "insym" dcl 5-12 in procedure "int_link_" set ref 297 305 entry 2 based structure array level 2 in structure "rpt" dcl 4-57 in procedure "int_link_" set ref 385 572 entry 2 based structure array level 2 in structure "od" dcl 4-48 in procedure "int_link_" entryname 24 based char(257) level 2 dcl 192 ref 242 281 errname 000012 internal static char(16) dcl 158 set ref 331* 338* 444* 504* 531* 548* 561* 563* estring based char(257) dcl 178 set ref 281* 306 expr 127 based bit(18) level 2 packed packed unaligned dcl 192 set ref 353 355 355 418* expression 000107 automatic fixed bin(18,0) dcl 163 set ref 353* 355* 399 418 480 491 515 ext based structure level 1 dcl 192 ext_link_ 000026 constant entry external dcl 151 ref 450 external_ref based structure level 1 dcl 1-12 filename based char(32) level 2 dcl 3-16 set ref 331* 466* 504* 531* 548* fixed builtin function dcl 186 ref 255 322 353 355 404 406 force_retain 000121 automatic bit(1) dcl 170 set ref 238* 239* 348 global_nolink 3(01) based bit(1) level 2 packed packed unaligned dcl 5-12 ref 239 289 halfword 3 based char(3) array level 3 in structure "rpt" dcl 4-57 in procedure "int_link_" set ref 517* halfword 1 based char(3) level 2 in structure "rpte" dcl 4-63 in procedure "int_link_" set ref 386* hash_index 000112 automatic fixed bin(34,0) dcl 165 set ref 265* 267* 267 269* 269 274 hash_ptr 000114 automatic pointer dcl 166 set ref 274* 274* 276* 278 284 hash_table based pointer array level 2 packed packed unaligned dcl 4-21 ref 269 274 hash_thread 16 based pointer level 2 dcl 4-29 ref 278 hbound builtin function dcl 186 ref 269 572 i 000100 automatic fixed bin(18,0) dcl 163 set ref 304* 305* 313* 314* 322* 323 325 327 329 335 337 341 342 instr based structure level 1 dcl 197 insym based structure level 1 dcl 5-12 insyme based structure level 1 dcl 193 insymentp 36 based pointer level 2 dcl 3-16 ref 237 288 int_limit 000111 automatic fixed bin(18,0) dcl 163 set ref 285* 488 internally_resolved constant bit(18) initial packed unaligned dcl 159 ref 321 371 380 459 476 ioa_ 000020 constant entry external dcl 148 ref 334 397 466 ip 000130 automatic pointer dcl 171 set ref 288* 289 291 297 305 is based structure level 1 dcl 5-20 lhe15 0(03) based bit(15) level 2 packed packed unaligned dcl 197 set ref 438* 456* 494* lhe18 based bit(18) level 2 packed packed unaligned dcl 194 set ref 400* 536* link_modifier 000110 automatic fixed bin(18,0) dcl 163 set ref 250* 251 425 429 496 498 542 544 link_td 130(03) based bit(4) level 2 packed packed unaligned dcl 192 ref 253 link_tm 130(01) based bit(2) level 2 packed packed unaligned dcl 192 ref 252 loffset 11 000404 automatic fixed bin(17,0) level 2 in structure "my_ext" dcl 182 in procedure "int_link_" set ref 441* loffset 11 based fixed bin(17,0) level 2 in structure "ext" dcl 192 in procedure "int_link_" ref 249 lrt based structure level 1 dcl 4-84 lrt_index 000120 automatic fixed bin(17,0) dcl 169 set ref 249* 321 371 380 459 476 lrtp 000554 automatic pointer dcl 4-17 set ref 248* 249 321 371 380 459 476 max_size based fixed bin(17,0) level 2 dcl 4-48 ref 335 min builtin function dcl 186 ref 266 mod builtin function dcl 186 ref 269 modifier 0(30) based bit(6) level 2 packed packed unaligned dcl 197 set ref 498* 544* modifier_overlay based structure level 1 dcl 204 modp 000136 automatic pointer dcl 173 set ref 251* 252 253 my_ext 000404 automatic structure level 1 dcl 182 set ref 442 442 449 449 450 450 my_result 000403 automatic bit(1) dcl 181 set ref 449* 450 n_insyms 2 based fixed bin(17,0) level 2 dcl 5-12 ref 291 n_odds 1 based fixed bin(17,0) level 2 dcl 4-48 set ref 313 337* 342* name based char(33) level 2 in structure "seg" dcl 4-29 in procedure "int_link_" ref 276 name 2 based char(289) array level 3 in structure "od" dcl 4-48 in procedure "int_link_" set ref 314 341* ndefs 000103 automatic fixed bin(18,0) dcl 163 set ref 291* 297 304 no_link 110(09) based bit(1) level 2 packed packed unaligned dcl 193 ref 345 npt 1 based fixed bin(17,0) level 2 dcl 4-57 set ref 571 571* 581* null builtin function dcl 186 ref 274 580 od based structure level 1 dcl 4-48 oddname 000261 automatic char(65) dcl 177 set ref 309* 310* 311* 314 334* 341 odnp 000546 automatic pointer dcl 4-17 set ref 312* 313 314 335 337 341 342 offset 4 based fixed bin(18,0) level 2 dcl 192 set ref 466* 548* p 000122 automatic pointer dcl 171 set ref 237* 239 486* 487* 487 578 pbase 2 based char(1) level 2 in structure "rpte" packed packed unaligned dcl 4-63 in procedure "int_link_" set ref 388* pbase 4 based char(1) array level 3 in structure "rpt" packed packed unaligned dcl 4-57 in procedure "int_link_" set ref 519* pexpr 0(18) based bit(18) level 2 in structure "rpte" packed packed unaligned dcl 4-63 in procedure "int_link_" set ref 389* pexpr 2(18) based bit(18) array level 3 in structure "rpt" packed packed unaligned dcl 4-57 in procedure "int_link_" set ref 520* poffset 2 based bit(18) array level 3 in structure "rpt" packed packed unaligned dcl 4-57 in procedure "int_link_" set ref 518* poffset based bit(18) level 2 in structure "rpte" packed packed unaligned dcl 4-63 in procedure "int_link_" set ref 387* pos 000116 automatic fixed bin(17,0) dcl 167 set ref 266* 267* ref_ptr 2 000404 automatic pointer level 2 in structure "my_ext" dcl 182 in procedure "int_link_" set ref 439* ref_ptr 2 based pointer level 2 in structure "ext" dcl 192 in procedure "int_link_" ref 246 439 refp 000124 automatic pointer dcl 171 set ref 246* 387 400 438 456 463 488 494 496 498 518 536 540 542 544 regenerated 2 based bit(18) array level 2 packed packed unaligned dcl 4-84 set ref 321* 371* 380* 459* 476* rel builtin function dcl 186 ref 387 518 result parameter bit(1) dcl 141 set ref 138 234* 320* 370* 379* 458* 475* retain 110(08) based bit(1) level 2 packed packed unaligned dcl 193 set ref 351* 469* rhe15 0(21) based bit(15) level 2 packed packed unaligned dcl 208 ref 438 456 494 rhe18 0(18) based bit(18) level 2 packed packed unaligned dcl 194 ref 400 536 rpt based structure level 1 dcl 4-57 set ref 574 574 579 579 rpte based structure level 1 dcl 4-63 rptep 000552 automatic pointer dcl 4-17 set ref 385* 386 387 388 389 391 394 rptp 000550 automatic pointer dcl 4-17 set ref 385 517 518 519 520 521 570* 571 571 572 574 574 575 576* 577 578 579 579 579 579 580 581 seg based structure level 1 dcl 4-29 segname 12 based char(33) level 2 dcl 192 ref 241 259 side 5 based char(3) level 2 dcl 192 ref 386 517 size builtin function dcl 188 ref 574 574 579 579 slng 23 based fixed bin(17,0) level 2 dcl 192 ref 241 266 310 311 snapped 110(01) based bit(1) level 2 packed packed unaligned dcl 193 set ref 499* 538* snt based structure level 1 dcl 4-21 sntp 000544 automatic pointer dcl 4-17 set ref 232* 269 274 start_offset 1 based fixed bin(18,0) level 2 unsigned dcl 4-84 ref 249 string 000140 automatic char(33) dcl 174 set ref 259* 267 276 substr builtin function dcl 186 set ref 241 242 267 281* 281 310* 311* 355 symbol 3 based char(257) level 2 dcl 193 ref 306 symbol_relocation 000011 internal static fixed bin(17,0) dcl 156 set ref 287* 515 targp 000134 automatic pointer dcl 171 set ref 284* 285 286 287 288 369* 418 440 455 486 491 504 504 531 td 0(32) based bit(4) level 2 packed packed unaligned dcl 204 set ref 253* 463 temp_mgr_$allocate 000022 constant entry external dcl 149 ref 574 temp_mgr_$reserve 000024 constant entry external dcl 150 ref 579 text_relocation 000010 internal static fixed bin(17,0) dcl 156 set ref 286* 480 thread based pointer level 2 packed packed unaligned dcl 4-57 set ref 575* 578* 580* tm 0(30) based bit(2) level 2 packed packed unaligned dcl 204 set ref 252* 488 496* 542* toffset 000105 automatic fixed bin(18,0) dcl 163 set ref 381* 390* 399* 399 400 480* 515* 536 trap 126(18) based bit(18) level 2 packed packed unaligned dcl 192 set ref 414* type 000102 automatic fixed bin(18,0) dcl 163 in procedure "int_link_" set ref 255* 257 292 294 318 358 358 366 376 414 499 type 126 based bit(18) level 2 in structure "ext" packed packed unaligned dcl 192 in procedure "int_link_" set ref 255 416* unspec builtin function dcl 186 ref 267 val 000101 automatic fixed bin(18,0) dcl 163 set ref 254* 491* 494 value 1 based bit(18) level 2 in structure "insyme" packed packed unaligned dcl 193 in procedure "int_link_" ref 406 value 000106 automatic fixed bin(18,0) dcl 163 in procedure "int_link_" set ref 368* 406* 418 438 441 455* 455 456 480 487 488 491 504* 515 527* 527 wentryname 000161 automatic char(256) dcl 176 set ref 242* 245* 311 331* 444* 504* 531* wnpt 000117 automatic fixed bin(17,0) dcl 168 set ref 385 517 518 519 520 521 571* 572 word based structure level 1 dcl 194 wsegname 000151 automatic char(32) dcl 175 set ref 241* 309 323* 325* 327* 329* 331* 381 391 394 397* 444* NAMES DECLARED BY DECLARE STATEMENT AND NEVER REFERENCED. INTERNALLY_RESOLVED internal static bit(18) initial packed unaligned dcl 4-91 UNRESOLVED internal static bit(18) initial packed unaligned dcl 4-90 adnp automatic pointer dcl 4-17 an based structure level 1 dcl 4-40 bx_$addname external static fixed bin(17,0) dcl 2-58 bx_$addname_limit external static fixed bin(17,0) dcl 2-24 bx_$adnp external static pointer dcl 2-36 bx_$area_begin external static fixed bin(18,0) dcl 2-25 bx_$bdefp external static pointer dcl 2-38 bx_$bindmap_def external static pointer dcl 2-37 bx_$blnkp external static pointer dcl 2-40 bx_$bound_segname external static char(32) dcl 2-48 bx_$bproc external static fixed bin(17,0) dcl 2-67 bx_$brief external static fixed bin(17,0) dcl 2-60 bx_$bseg_acinfop external static pointer dcl 2-50 bx_$bseg_bitcount external static fixed bin(24,0) dcl 2-51 bx_$bsegp external static pointer dcl 2-30 bx_$bstatp external static pointer dcl 2-39 bx_$bsymp external static pointer dcl 2-41 bx_$curdeflng external static fixed bin(18,0) dcl 2-69 bx_$d_lng external static fixed bin(18,0) dcl 2-54 bx_$first_rptp external static pointer dcl 2-34 bx_$force_order external static fixed bin(17,0) dcl 2-61 bx_$has_comb_stat external static fixed bin(17,0) dcl 2-63 bx_$has_sep_stat external static fixed bin(17,0) dcl 2-62 bx_$i_lng external static fixed bin(17,0) dcl 2-55 bx_$inpp external static pointer dcl 2-29 bx_$isp external static pointer dcl 2-28 bx_$l_lng external static fixed bin(17,0) dcl 2-56 bx_$maxdeflng external static fixed bin(18,0) dcl 2-72 bx_$maxlinklng external static fixed bin(17,0) dcl 2-71 bx_$n_firstrefs external static fixed bin(17,0) dcl 2-47 bx_$n_lng external static fixed bin(17,0) dcl 2-76 bx_$ncomp external static fixed bin(17,0) dcl 2-74 bx_$nsegdefs external static fixed bin(17,0) dcl 2-78 bx_$nsymdefs external static fixed bin(17,0) dcl 2-77 bx_$o_lng external static fixed bin(19,0) dcl 2-52 bx_$oddname_limit external static fixed bin(17,0) dcl 2-22 bx_$optp external static pointer dcl 2-32 bx_$perprocess_static external static fixed bin(17,0) dcl 2-65 bx_$s_lng external static fixed bin(18,0) dcl 2-57 bx_$size external static fixed bin(17,0) dcl 2-20 bx_$snt_limit external static fixed bin(17,0) dcl 2-21 bx_$standard external static fixed bin(17,0) dcl 2-66 bx_$stringmap_limit external static fixed bin(17,0) dcl 2-23 bx_$strmp external static pointer dcl 2-46 bx_$t_lng external static fixed bin(18,0) dcl 2-53 bx_$tdefp external static pointer dcl 2-43 bx_$temp external static pointer dcl 2-31 bx_$temp_bsegp external static pointer dcl 2-79 bx_$textlng external static fixed bin(18,0) dcl 2-68 bx_$tintlng external static fixed bin(17,0) dcl 2-70 bx_$tintp external static pointer dcl 2-44 bx_$tlinklng external static fixed bin(17,0) dcl 2-73 bx_$tlinkp external static pointer dcl 2-45 bx_$v_lng external static fixed bin(17,0) dcl 2-75 bx_$vers_name external static char(168) dcl 2-18 bx_$vers_number external static fixed bin(17,0) dcl 2-19 comp_tbl based pointer array dcl 3-12 strm based structure level 1 dcl 4-73 strmp automatic pointer dcl 4-17 NAMES DECLARED BY EXPLICIT CONTEXT. create_rpt_entry 002071 constant entry internal dcl 567 ref 384 516 definition_found 001001 constant label dcl 345 ref 299 306 have_target 001015 constant label dcl 353 ref 257 illegal_entry 001570 constant label dcl 504 illegal_reference 001773 constant label dcl 548 init 002043 constant entry external dcl 558 int_link_ 000240 constant entry external dcl 138 ref 449 null_ent 000506 constant label dcl 297 ref 292 patch_modifier 001755 constant label dcl 540 ref 401 return 002041 constant label dcl 552 ref 279 289 314 339 343 345 421 470 501 508 534 546 segdef_in_linkage 001534 constant label dcl 491 ref 372 528 segname_found 000445 constant label dcl 281 ref 276 update_reference 001746 constant label dcl 536 ref 481 522 THERE WERE NO NAMES DECLARED BY CONTEXT OR IMPLICATION. STORAGE REQUIREMENTS FOR THIS PROGRAM. Object Text Link Symbol Defs Static Start 0 0 2330 2404 2150 2340 Length 2674 2150 54 253 160 6 BLOCK NAME STACK SIZE TYPE WHY NONQUICK/WHO SHARES STACK FRAME int_link_ 476 external procedure is an external procedure. create_rpt_entry internal procedure shares stack frame of external procedure int_link_. STORAGE FOR INTERNAL STATIC VARIABLES. LOC IDENTIFIER BLOCK NAME 000010 text_relocation int_link_ 000011 symbol_relocation int_link_ 000012 errname int_link_ STORAGE FOR AUTOMATIC VARIABLES. STACK FRAME LOC IDENTIFIER BLOCK NAME int_link_ 000100 i int_link_ 000101 val int_link_ 000102 type int_link_ 000103 ndefs int_link_ 000104 class int_link_ 000105 toffset int_link_ 000106 value int_link_ 000107 expression int_link_ 000110 link_modifier int_link_ 000111 int_limit int_link_ 000112 hash_index int_link_ 000114 hash_ptr int_link_ 000116 pos int_link_ 000117 wnpt int_link_ 000120 lrt_index int_link_ 000121 force_retain int_link_ 000122 p int_link_ 000124 refp int_link_ 000126 ap int_link_ 000130 ip int_link_ 000132 dp int_link_ 000134 targp int_link_ 000136 modp int_link_ 000140 string int_link_ 000151 wsegname int_link_ 000161 wentryname int_link_ 000261 oddname int_link_ 000302 ebit int_link_ 000403 my_result int_link_ 000404 my_ext int_link_ 000540 ctp int_link_ 000542 ctep int_link_ 000544 sntp int_link_ 000546 odnp int_link_ 000550 rptp int_link_ 000552 rptep int_link_ 000554 lrtp int_link_ THE FOLLOWING EXTERNAL OPERATORS ARE USED BY THIS PROGRAM. call_ext_in call_ext_out_desc call_ext_out return_mac mdfx1 ext_entry trunc_fx1 THE FOLLOWING EXTERNAL ENTRIES ARE CALLED BY THIS PROGRAM. com_err_ decode_link_ ext_link_ ioa_ temp_mgr_$allocate temp_mgr_$reserve THE FOLLOWING EXTERNAL VARIABLES ARE USED BY THIS PROGRAM. bx_$bound_sep_stat bx_$caller bx_$ctp bx_$debug bx_$fatal_error bx_$freep bx_$last_rptp bx_$odnp bx_$sntp LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC 179 000227 138 000234 231 000246 232 000252 233 000255 234 000261 235 000262 237 000266 238 000271 239 000272 241 000301 242 000306 245 000316 246 000321 247 000323 248 000324 249 000326 250 000341 251 000342 252 000344 253 000351 254 000356 255 000357 257 000362 259 000364 265 000367 266 000370 267 000403 268 000416 269 000420 274 000426 276 000434 278 000441 279 000444 281 000445 284 000452 285 000454 286 000457 287 000462 288 000464 289 000466 291 000473 292 000475 294 000503 297 000506 299 000512 304 000513 305 000523 306 000527 308 000533 309 000535 310 000540 311 000545 312 000552 313 000556 314 000567 316 000576 318 000600 320 000603 321 000606 322 000614 323 000620 325 000626 327 000634 329 000642 331 000647 332 000707 333 000712 334 000713 335 000733 337 000736 338 000741 339 000766 341 000767 342 000775 343 001000 345 001001 348 001006 350 001011 351 001013 353 001015 355 001023 358 001033 360 001040 362 001044 366 001050 368 001053 369 001055 370 001057 371 001062 372 001070 376 001071 379 001074 380 001077 381 001105 384 001115 385 001116 386 001123 387 001126 388 001130 389 001132 390 001134 391 001135 394 001144 397 001153 399 001173 400 001175 401 001201 404 001202 406 001206 408 001211 414 001220 416 001225 417 001232 418 001237 421 001250 425 001251 427 001253 429 001260 431 001263 438 001266 439 001273 440 001275 441 001277 442 001301 444 001320 446 001355 447 001360 449 001361 450 001373 452 001407 453 001410 455 001412 456 001417 458 001424 459 001427 460 001435 463 001436 466 001441 468 001465 469 001470 470 001472 475 001473 476 001476 478 001504 480 001506 481 001513 484 001514 486 001516 487 001521 488 001524 491 001534 494 001541 496 001546 498 001553 499 001561 501 001567 504 001570 507 001636 508 001641 513 001642 515 001644 516 001651 517 001652 518 001657 519 001663 520 001666 521 001670 522 001673 525 001674 527 001676 528 001700 531 001701 533 001742 534 001745 536 001746 538 001752 540 001755 542 001757 544 001764 546 001772 548 001773 550 002036 552 002041 558 002042 561 002051 563 002061 565 002070 567 002071 570 002072 571 002076 572 002103 574 002105 575 002115 576 002121 577 002122 578 002124 579 002126 580 002137 581 002141 584 002143 ----------------------------------------------------------- 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