COMPILATION LISTING OF SEGMENT cref_analyze_ Compiled by: Multics PL/I Compiler, Release 27d, of October 11, 1982 Compiled at: Honeywell LISD Phoenix, System M Compiled on: 01/11/83 1507.6 mst Tue Options: optimize map 1 /* *********************************************************** 2* * * 3* * Copyright, (C) Honeywell Information Systems Inc., 1982 * 4* * * 5* * Copyright (c) 1972 by Massachusetts Institute of * 6* * Technology and Honeywell Information Systems, Inc. * 7* * * 8* *********************************************************** */ 9 10 11 /* format: style1,^inddcls,ifthenstmt,ifthendo,ifthen,indcomtxt,dclind5 */ 12 13 cref_analyze_: procedure (ename_arg, first_pass); 14 15 /* This crossreferencer module digs into object segs and analyzes their 16* definitions and links. */ 17 18 /* Modified 740401 by Paul Green to allow type-6 links 19* Modified 750414 by PG to handle type-6 links of form a$ 20* Much renovated by C. D. Tavares 03/04/76 for environments, 2-pass operation, 21* etc. 22* Modified by CDT 08/31/76 to use renamed MBZ fields in new linkdcl.incl.pl1 23* Modified 09/81 by CDT to track source language suffix. 24* Modified November 1982 by CAH to fix bindfile parse. 25* Modified January 1983 by BIM to fix bug uncovered by CAH; legal characters 26* were rejected in bindfiles. 27**/ 28 29 /* parameters */ 30 31 dcl (ename_arg char (*), 32 first_pass bit (1) aligned) parameter; 33 34 /* entries */ 35 36 dcl com_err_ entry options (variable), 37 cref_filegen_$report_error 38 entry options (variable), 39 archive_util_$first_element 40 entry (ptr, fixed bin (35)), 41 archive_util_$next_element 42 entry (ptr, fixed bin (35)), 43 object_info_$display entry (ptr, fixed bin (24), ptr, fixed bin (35)), 44 decode_definition_$decode_cref 45 entry (ptr, ptr, bit (1) aligned, ptr), 46 hcs_$terminate_noname entry (pointer, fixed bin (35)), 47 hcs_$initiate_count entry (char (*), char (*), char (*), 48 fixed bin (24), fixed bin, ptr, fixed bin (35)); 49 50 dcl cref_listman_$get_name entry (pointer) returns (char (32) varying), 51 cref_listman_$create_primary_block_char 52 entry (char (*) varying, pointer, pointer, pointer, 53 bit (1) aligned, bit (1) aligned, bit (1) aligned) 54 returns (pointer), 55 cref_listman_$predefine_primary_block_char 56 entry (char (*) varying, pointer, pointer, 57 bit (1) aligned, bit (1) aligned, bit (1) aligned) 58 returns (pointer), 59 cref_listman_$create_primary_block_acc 60 entry (pointer, pointer, pointer, bit (1) aligned, 61 bit (1) aligned, bit (1) aligned) 62 returns (pointer), 63 cref_listman_$create_syn_block 64 entry (char (*) varying, pointer, pointer, 65 bit (1) aligned, pointer), 66 cref_listman_$create_environment 67 entry (char (*) varying, bit (1) aligned) 68 returns (pointer), 69 cref_listman_$assign_def_block 70 entry (pointer dimension (*), fixed bin, pointer), 71 cref_listman_$assign_ref_block 72 entry (pointer dimension (*), fixed bin, pointer), 73 cref_listman_$create_include_file_block 74 entry (char (*) varying, bit (72) aligned) 75 returns (pointer), 76 cref_listman_$assign_include_file_block 77 entry (pointer dimension (*), fixed bin, pointer); 78 79 /* automatic */ 80 81 dcl bindfile_char_count fixed bin (24); 82 83 dcl external_names (500) char (32), 84 n_external_names fixed bin; 85 86 dcl 1 oi aligned like object_info; 87 88 dcl array (1000) pointer, 89 array_count fixed bin, 90 offset fixed bin (18); 91 92 dcl dirname char (168), 93 ename char (32), 94 varying_segname char (32) varying, 95 varying_dir_description 96 char (168) varying, 97 component_name char (32) varying; 98 99 dcl i fixed bin; 100 101 dcl 1 arg_structure aligned, 102 2 next_def ptr, 103 2 last_def ptr, 104 2 block_ptr ptr, 105 2 section char (4) aligned, 106 2 offset fixed bin, 107 2 entrypoint fixed bin, 108 2 acc_ptr ptr; 109 110 dcl acc_ptr ptr, 111 linkage_header_ptr ptr, 112 definitions_ptr ptr, 113 seg_ptr pointer, 114 component_ptr pointer, 115 nomore bit (1) aligned, 116 none_found bit (1) aligned, 117 links_end fixed bin (18), 118 (link_ptr, type_ptr) ptr, 119 (ltype, dir_idx) fixed bin (18), 120 component_node pointer, 121 boundseg_node pointer, 122 dir_node pointer, 123 code fixed bin (35); 124 125 dcl is_external bit (1) aligned, 126 bitcount fixed bin (24); 127 128 dcl (segref_name, defref_name) char (32) varying; 129 130 dcl 1 acc_string aligned based (acc_ptr), 131 2 acclen fixed bin (9) unaligned unsigned, 132 2 string char (acc_string.acclen) unaligned; 133 134 /* builtins */ 135 136 dcl (addr, addrel, binary, 137 divide, empty, hbound, 138 index, null, length, 139 pointer, reverse, rtrim, 140 search, substr, verify) builtin; 141 142 dcl cref_abort_ condition; 143 144 /* external static */ 145 146 dcl (error_table_$noalloc, 147 error_table_$bad_segment, 148 error_table_$noentry) fixed bin (35) external static; 149 150 /* based */ 151 152 dcl 1 search_dir_struc aligned based (search_dir_ptr), 153 2 make_all_names_external 154 bit (1) aligned, 155 2 max_dirs fixed bin, 156 2 n_dirs fixed bin, 157 2 item (0 refer (search_dir_struc.n_dirs)), 158 3 search_dirs char (168), 159 3 search_dir_descriptions 160 char (168) varying; 161 162 dcl search_dir_ptr pointer static; 163 164 dcl based_word bit (36) aligned based; 165 166 dcl 1 archive_header based (component_ptr) aligned, 167 2 pad0 char (12) unal, 168 2 name char (32) unal, 169 2 pad1 char (40) unal, 170 2 bitcnt char (8) unal, 171 2 pad2 char (8) unal, 172 2 data char (1) unal; 173 174 /* include files */ 175 1 1 /* BEGIN INCLUDE FILE ... object_info.incl.pl1 1 2*coded February 8, 1972 by Michael J. Spier */ 1 3 /* modified May 26, 1972 by M. Weaver */ 1 4 /* modified 15 April, 1975 by M. Weaver */ 1 5 1 6 declare 1 object_info aligned based, /* structure containing object info based, returned by object_info_ */ 1 7 2 version_number fixed bin, /* version number of current structure format (=2) */ 1 8 2 textp pointer, /* pointer to beginning of text section */ 1 9 2 defp pointer, /* pointer to beginning of definition section */ 1 10 2 linkp pointer, /* pointer to beginning of linkage section */ 1 11 2 statp pointer, /* pointer to beginning of static section */ 1 12 2 symbp pointer, /* pointer to beginning of symbol section */ 1 13 2 bmapp pointer, /* pointer to beginning of break map (may be null) */ 1 14 2 tlng fixed bin, /* length in words of text section */ 1 15 2 dlng fixed bin, /* length in words of definition section */ 1 16 2 llng fixed bin, /* length in words of linkage section */ 1 17 2 ilng fixed bin, /* length in words of static section */ 1 18 2 slng fixed bin, /* length in words of symbol section */ 1 19 2 blng fixed bin, /* length in words of break map */ 1 20 2 format, /* word containing bit flags about object type */ 1 21 3 old_format bit(1) unaligned, /* on if segment isn't in new format, i.e. has old style object map */ 1 22 3 bound bit(1) unaligned, /* on if segment is bound */ 1 23 3 relocatable bit(1) unaligned, /* on if seg has relocation info in its first symbol block */ 1 24 3 procedure bit(1) unaligned, /* on if segment is an executable object program */ 1 25 3 standard bit(1) unaligned, /* on if seg is in standard format (more than just standard map) */ 1 26 3 gate bit(1) unaligned, /* on if segment is a gate */ 1 27 3 separate_static bit(1) unaligned, /* on if static not in linkage */ 1 28 3 links_in_text bit(1) unaligned, /* on if there are threaded links in text */ 1 29 3 perprocess_static bit (1) unaligned, /* on if static is not to be per run unit */ 1 30 3 pad bit(27) unaligned, 1 31 2 entry_bound fixed bin, /* entry bound if segment is a gate */ 1 32 2 textlinkp pointer, /* ptr to first link in text */ 1 33 1 34 /* LIMIT OF BRIEF STRUCTURE */ 1 35 1 36 2 compiler char(8) aligned, /* name of processor which generated segment */ 1 37 2 compile_time fixed bin(71), /* clock reading of date/time object was generated */ 1 38 2 userid char(32) aligned, /* standard Multics id of creator of object segment */ 1 39 2 cvers aligned, /* generator version name in printable char string form */ 1 40 3 offset bit(18) unaligned, /* offset of name in words relative to base of symbol section */ 1 41 3 length bit(18) unaligned, /* length of name in characters */ 1 42 2 comment aligned, /* printable comment concerning generator or generation of segment */ 1 43 3 offset bit(18) unaligned, /* offset of comment in words relative to base of symbol section */ 1 44 3 length bit(18) unaligned, /* length of comment in characters */ 1 45 2 source_map fixed bin, /* offset, relative to base of symbol section, of source map structure */ 1 46 1 47 /* LIMIT OF DISPLAY STRUCTURE */ 1 48 1 49 2 rel_text pointer, /* pointer to text section relocation info */ 1 50 2 rel_def pointer, /* pointer to definition section relocation info */ 1 51 2 rel_link pointer, /* pointer to linkage section relocation info */ 1 52 2 rel_static pointer, /* pointer to static section relocation info */ 1 53 2 rel_symbol pointer, /* pointer to symbol section relocation info */ 1 54 2 text_boundary fixed bin, /* specifies mod of text section base boundary */ 1 55 2 static_boundary fixed bin, /* specifies mod of internal static base boundary */ 1 56 /* currently not used by system */ 1 57 2 default_truncate fixed bin, /* offset rel to symbp for binder to automatically trunc. symb sect. */ 1 58 2 optional_truncate fixed bin; /* offset rel to symbp for binder to optionally trunc. symb sect. */ 1 59 1 60 declare object_info_version_2 fixed bin int static init(2); 1 61 1 62 /* END INCLUDE FILE ... object_info.incl.pl1 */ 176 2 1 /* BEGIN INCLUDE FILE linkdcl.incl.pl1 --- last modified 15 Nov 1971 by C Garman */ 2 2 2 3 /* Last Modified (Date and Reason): 2 4* 6/75 by M.Weaver to add virgin_linkage_header declaration 2 5* 6/75 by S.Webber to comment existing structures better 2 6* 9/77 by M. Weaver to add run_depth to link 2 7**/ 2 8 2 9 dcl 1 link based aligned, /* link pair in linkage section */ 2 10 2 head_ptr bit (18) unal, /* rel pointer to beginning of linkage section */ 2 11 2 ringno bit (3) unal, 2 12 2 mbz bit (3) unal, 2 13 2 run_depth fixed bin (5) unal, /* run unit depth, filled when link is snapped */ 2 14 2 ft2 bit (6) unal, /* fault tag. 46(8) if not snapped, 43(8) if snapped */ 2 15 2 16 2 exp_ptr bit (18) unal, /* pointer (rel to defs) of expression word */ 2 17 2 mbz2 bit (12) unal, 2 18 2 modifier bit (6) unal; /* modifier to be left in snapped link */ 2 19 2 20 dcl 1 exp_word based aligned, /* expression word in link definition */ 2 21 2 type_ptr bit (18) unal, /* pointer (rel to defs) of type pair structure */ 2 22 2 exp bit (18) unal; /* constant expression to be added in when snapping link */ 2 23 2 24 dcl 1 type_pair based aligned, /* type pair in link definition */ 2 25 2 type bit (18) unal, /* type of link. may be 1,2,3,4,5, or 6 */ 2 26 2 trap_ptr bit (18) unal, /* pointer (rel to defs) to the trap word */ 2 27 2 seg_ptr bit (18) unal, /* pointer to ACC reference name for segment referenced */ 2 28 2 ext_ptr bit (18) unal; /* pointer (rel to defs) of ACC segdef name */ 2 29 2 30 dcl 1 header based aligned, /* linkage block header */ 2 31 2 def_ptr ptr, /* pointer to definition section */ 2 32 2 symbol_ptr ptr unal, /* pointer to symbol section in object segment */ 2 33 2 original_linkage_ptr ptr unal, /* pointer to linkage section in object segment */ 2 34 2 unused bit (72), 2 35 2 stats, 2 36 3 begin_links bit (18) unal, /* offset (rel to this section) of first link */ 2 37 3 block_length bit (18) unal, /* number of words in this linkage section */ 2 38 3 segment_number bit (18) unal, /* text segment number associated with this section */ 2 39 3 static_length bit (18) unal; /* number of words of static for this segment */ 2 40 2 41 dcl 1 virgin_linkage_header aligned based, /* template for linkage header in object segment */ 2 42 2 pad bit (30) unaligned, /* is filled in by linker */ 2 43 2 defs_in_link bit (6) unaligned, /* =o20 if defs in linkage (nonstandard) */ 2 44 2 def_offset bit (18) unaligned, /* offset of definition section */ 2 45 2 first_ref_relp bit (18) unaligned, /* offset of trap-at-first-reference offset array */ 2 46 2 filled_in_later bit (144), 2 47 2 link_begin bit (18) unaligned, /* offset of first link */ 2 48 2 linkage_section_lng bit (18) unaligned, /* length of linkage section */ 2 49 2 segno_pad bit (18) unaligned, /* will be segment number of copied linkage */ 2 50 2 static_length bit (18) unaligned; /* length of static section */ 2 51 2 52 2 53 dcl 1 trap_word based aligned, /* trap word in link definition */ 2 54 2 call_ptr bit (18) unal, /* pointer (rel to link) of link to trap procedure */ 2 55 2 arg_ptr bit (18) unal; /* pointer (rel to link) of link to arg info for trap proc */ 2 56 2 57 dcl 1 name based aligned, /* storage of ASCII names in definitions */ 2 58 2 nchars bit (9) unaligned, /* number of characters in name */ 2 59 2 char_string char (31) unaligned; /* 31-character name */ 2 60 2 61 /* END INCLUDE FILE linkdcl.incl.pl1 */ 177 178 179 /* The following include file (source_map) has been copied and modified, 180* rather than using the include file because the include file doesn't work 181* when source maps occur on odd word boundaries (inside archives) - dtm is 182* declared there as fixed bin (71), and gets even-word fetched whether it's 183* there or not */ 184 185 dcl 1 source_map aligned based (source_map_p), 186 2 version fixed bin, 187 2 number fixed bin, 188 2 map (0 refer (source_map.number)) aligned, 189 3 pathname unaligned, 190 4 offset bit (18), 191 4 size bit (18), 192 3 uid bit (36), 193 3 dtm bit (72); 194 195 dcl source_map_p pointer, 196 source_path_ptr ptr, 197 source_path_len fixed bin, 198 source_path char (source_path_len) based (source_path_ptr); 199 200 /* initialize random state variables */ 201 202 bindfile_char_count = 0; 203 n_external_names = 0; 204 oi.version_number = object_info_version_2; 205 seg_ptr = null; 206 ename = ename_arg; 207 208 none_found = "1"b; 209 210 211 /* Search for this module in all the search directories */ 212 213 if search_dir_struc.n_dirs < 1 then do; 214 call com_err_ (0, "cref_analyze_", 215 "No search list specified for segment ^a.", ename); 216 goto signal_abort; 217 end; 218 219 do dir_idx = 1 to search_dir_struc.n_dirs; 220 221 varying_segname = rtrim (ename); 222 dirname = search_dirs (dir_idx); 223 224 call hcs_$initiate_count 225 (dirname, ename, "", bitcount, 0, seg_ptr, code); 226 227 if seg_ptr = null then 228 if code = error_table_$noentry then ; /* well, ok */ 229 else goto crump; /* oh oh */ 230 231 else do; /* we found it */ 232 none_found = ""b; 233 varying_dir_description = 234 search_dir_descriptions (dir_idx); 235 236 call process_segment; 237 238 call hcs_$terminate_noname (seg_ptr, code); 239 240 /* Even if found, keep looping to search other dirs unless user said -first */ 241 242 if first_switch then return; 243 end; 244 end; 245 246 if none_found then 247 crump: 248 if first_pass then 249 call com_err_ (code, "cref_analyze_", ename); 250 251 /* We know code is error_table_$noentry at this point. This is non-fatal */ 252 253 return; 254 255 returner: 256 call hcs_$terminate_noname (seg_ptr, code); 257 return; 258 259 process_segment: proc; 260 261 dir_node = 262 cref_listman_$create_environment 263 (varying_dir_description, "1"b); 264 265 /* Ignore names of the form "mumble.1"-- this is garbage left by update_seg */ 266 267 if length (varying_segname) > length (".1") then 268 if substr (varying_segname, 269 length (varying_segname) - 1, 1) = "." then 270 if search (substr (varying_segname, 271 length (varying_segname), 1), "0123456789") > 0 then 272 return; 273 274 /* Ignore unique names (same reason) */ 275 276 if substr (varying_segname, 1, 1) = "!" then return; 277 278 279 /* Now see if the segment we're examining is an archive or standalone. Process 280* each as they deserve. */ 281 282 if contains_suffix (varying_segname, ".archive") then do; 283 284 varying_segname = 285 substr (varying_segname, 1, 286 length (varying_segname) - length (".archive")); 287 288 /* Check for componented object archives (with names of the form bound_foo_.1, 289* bound_foo_.2, etc. Treat as one archive. */ 290 291 i = index (reverse (varying_segname), "."); 292 if i > 0 then 293 if verify (reverse (varying_segname), "0123456789") 294 = i then 295 varying_segname = substr (varying_segname, 1, 296 length (varying_segname) - i); 297 298 if first_pass then 299 call find_bindfile (seg_ptr, varying_segname); 300 301 /* The environment of all these components will be the bound segment name and 302* the dir description */ 303 304 boundseg_node = cref_listman_$create_environment 305 (varying_segname, (bindfile_char_count > 0)); 306 307 /* Add all synonyms for all components */ 308 309 if bindfile_char_count > 0 then call add_bindfile_synonyms; 310 311 /* Loop through all components, examining their definitions and links */ 312 313 component_ptr = seg_ptr; 314 315 call archive_util_$first_element (component_ptr, code); 316 if code ^= 0 then do; 317 call com_err_ (code, "cref_analyze_", 318 "Archive format error in ^a.", ename); 319 return; 320 end; 321 322 do while (code ^= 1); 323 324 /* (which is archive_util_'s clever way of saying it's done) */ 325 326 component_name = rtrim (archive_header.name); 327 328 /* Try not to process bindfiles! */ 329 330 if ^contains_suffix (component_name, ".bind") then 331 call process_component 332 (component_name, addr (archive_header.data), 333 binary (bitcnt), "1"b); 334 335 call archive_util_$next_element (component_ptr, code); 336 end; 337 end; 338 339 340 /* Otherwise, segment is not an archive. */ 341 342 else do; 343 boundseg_node = stand_alone_node; 344 345 call process_component 346 (varying_segname, seg_ptr, bitcount, ""b); 347 end; 348 349 return; 350 351 end process_segment; 352 353 process_component: proc (module_name, module_ptr, bitcount, is_archive); 354 355 dcl module_name char (*) varying parameter, 356 module_ptr pointer parameter, 357 bitcount fixed bin (24) parameter, 358 is_archive bit (1) aligned parameter; 359 360 dcl hcs_$status_ entry (char (*), char (*), fixed bin, pointer, 361 pointer, fixed bin (35)); 362 363 dcl 1 branch_info aligned, 364 2 type bit (2) unaligned, 365 2 n_names fixed bin (15) unaligned, 366 2 names_relp bit (18) unaligned, 367 2 (dtm, dtu) bit (36) unaligned, 368 2 mode bit (5) unaligned, 369 2 pad bit (13) unaligned, 370 2 records fixed bin (17) unaligned; 371 372 dcl name_area area (2000); 373 374 dcl names (branch_info.n_names) char (32) aligned 375 based (names_ptr), 376 names_ptr pointer; 377 378 dcl varying_addname char (32) varying, 379 (i, j) fixed bin; 380 381 dcl lang_suffix_node pointer; 382 383 384 /* Get information about object seg. */ 385 386 call object_info_$display 387 (module_ptr, bitcount, addr (oi), code); 388 if code ^= 0 then do; 389 if first_pass then do; 390 call cref_filegen_$report_error 391 (code, "cref_analyze_", 392 "^a is non-object.", module_name); 393 component_node = 394 cref_listman_$create_primary_block_char 395 (module_name, non_object_node, (dir_node), 396 null, "1"b, "1"b, "1"b); /* do anyway */ 397 end; 398 return; 399 end; 400 401 if oi.bound then do; 402 403 /* A crossref of bound segments is useless, because you can no longer tell 404* which outward links are used by which components. */ 405 406 if first_pass then 407 call cref_filegen_$report_error 408 (error_table_$bad_segment, "cref_analyze_", 409 "^a is bound.", module_name); 410 return; 411 end; 412 413 if is_archive then 414 is_external = check_external_name (module_name); 415 else is_external = "1"b; 416 417 /* Get language suffix if available (some translators like lisp skip it) */ 418 419 lang_suffix_node = null; 420 421 if oi.source_map > 0 then do; 422 source_map_p = addrel (oi.symbp, oi.source_map); 423 source_path_ptr = addrel (oi.symbp, 424 source_map_p -> source_map.offset (1)); 425 source_path_len = 426 binary (source_map_p -> source_map.size (1)); 427 i = source_path_len + 2 428 - index (reverse (source_path), ">"); 429 j = index (substr (source_path, i), "."); 430 if j >= 0 then 431 lang_suffix_node = cref_listman_$create_environment 432 (substr (source_path, i + j - 1), "0"b); 433 end; 434 435 else source_map_p = null; 436 437 /* Enter this name into the Big Book */ 438 439 component_node = cref_listman_$create_primary_block_char 440 (module_name, boundseg_node, dir_node, lang_suffix_node, 441 "1"b, first_pass, is_external); 442 443 444 /* Get the info we need on both passes to munch this module */ 445 446 linkage_header_ptr = oi.linkp; 447 definitions_ptr = oi.defp; 448 449 call decode_definition_$decode_cref 450 (definitions_ptr, addr (arg_structure), nomore, 451 linkage_header_ptr); 452 453 454 if first_pass then do; 455 456 /* On the first pass, we record all necessary synonyms and all existing 457* definitions (entrypoints). */ 458 459 if ^is_archive then do; 460 461 /* Use any added names on the segment as synonyms */ 462 463 call hcs_$status_ 464 (dirname, ename, 1, addr (branch_info), 465 addr (name_area), code); 466 if code ^= 0 then goto crump; 467 468 names_ptr = pointer 469 (addr (name_area), branch_info.names_relp); 470 471 /* format: ind3 */ 472 473 do i = 1 to branch_info.n_names; 474 if names (i) ^= ename then do; 475 varying_addname = rtrim (names (i)); 476 477 call cref_listman_$create_syn_block 478 (varying_addname, boundseg_node, 479 dir_node, "1"b, component_node); 480 end; 481 end; 482 483 /* format: revert */ 484 485 free names in (name_area); 486 487 end; 488 489 490 /* Record all external definitions into this object segment. */ 491 492 array_count = 0; 493 494 do while (nomore = "0"b); 495 496 if (section = "text") | 497 (section = "link") then do; 498 499 array_count = array_count + 1; 500 501 if array_count > hbound (array, 1) then do; 502 explanation = "definitions"; 503 goto out_of_space; 504 end; 505 506 /* Record this definition */ 507 array (array_count) = 508 cref_listman_$create_primary_block_acc 509 (arg_structure.acc_ptr, component_node, 510 dir_node, ""b, "1"b, ""b); 511 end; 512 513 /* Find next definition */ 514 515 call decode_definition_$decode_cref 516 (arg_structure.next_def, 517 addr (arg_structure), nomore, null); 518 end; 519 520 if array_count > 0 then 521 call cref_listman_$assign_def_block 522 (array, array_count, component_node); 523 524 525 /* Now get info about include files if requested */ 526 527 if (do_include_files & source_map_p ^= null) then do; 528 529 array_count = 530 source_map_p -> source_map.number - 1; 531 532 if array_count > hbound (array, 1) then do; 533 explanation = "include files"; 534 goto out_of_space; 535 end; 536 537 /* Start from 2 (1 is the program's own source) */ 538 539 do i = 2 to source_map_p -> source_map.number; 540 541 source_path_ptr = addrel (oi.symbp, 542 source_map_p -> source_map.offset (i)); 543 source_path_len = binary 544 (source_map_p -> source_map.size (i)); 545 546 /* Strip off dirname */ 547 548 j = source_path_len + 2 549 - index (reverse (source_path), ">"); 550 551 array (i - 1) = 552 cref_listman_$create_include_file_block 553 (substr (source_path, j), 554 source_map_p -> source_map.dtm (i)); 555 end; 556 557 if array_count > 0 then 558 call cref_listman_$assign_include_file_block 559 (array, array_count, component_node); 560 561 end; 562 563 return; 564 end; 565 566 567 else do; 568 569 /* Pass two: record all links denoting outward references from this object 570* segment. */ 571 572 array_count = 0; 573 574 /* Avoid refugee definitions ("movdef") in linkage section */ 575 576 if linkage_header_ptr -> virgin_linkage_header.defs_in_link 577 = "010000"b then 578 links_end = binary (linkage_header_ptr -> 579 virgin_linkage_header.def_offset) - 2; 580 581 else links_end = binary (linkage_header_ptr -> 582 virgin_linkage_header.linkage_section_lng) - 2; 583 584 do offset = 585 binary (linkage_header_ptr -> header.begin_links) 586 to links_end by 2; 587 588 link_ptr = addrel (linkage_header_ptr, offset); 589 590 /* link.ft2 should be unsnapped link (46 octal) */ 591 592 if link_ptr -> link.ft2 = "46"b3 then do; 593 type_ptr = addrel (definitions_ptr, 594 addrel (definitions_ptr, link_ptr -> 595 link.exp_ptr) -> exp_word.type_ptr); 596 597 ltype = binary (type_ptr -> type_pair.type); 598 599 if ltype < 1 then goto bad_link_type; 600 if ltype > 6 then goto bad_link_type; 601 602 /* Get pointer to ACC string with segname in it */ 603 604 acc_ptr = addrel (definitions_ptr, 605 type_ptr -> type_pair.seg_ptr); 606 607 /* format: comcol40 */ 608 609 goto record_link_segref (ltype); 610 611 612 record_link_segref (1): /* myself$ */ 613 record_link_segref (5): /* myself$entry */ 614 615 /* Check for special "*system" link */ 616 617 if binary 618 (type_ptr -> type_pair.seg_ptr) = 5 619 then segref_name = "*system"; 620 else segref_name = module_name; 621 goto record_link_segref_common; 622 623 record_link_segref (3): /* segname$ */ 624 record_link_segref (4): /* segname$entry */ 625 record_link_segref (6): /* either, create-if-not-found */ 626 segref_name = acc_string.string; 627 628 record_link_segref_common: 629 array_count = array_count + 2; 630 if array_count > hbound (array, 1) then do; 631 explanation = "links"; 632 goto out_of_space; 633 end; 634 array (array_count - 1) = 635 cref_listman_$create_primary_block_char 636 (segref_name, boundseg_node, dir_node, 637 null, "1"b, ""b, ""b); 638 639 640 /* Get pointer to ACC entryname, if it exists */ 641 642 acc_ptr = addrel (definitions_ptr, 643 type_ptr -> type_pair.ext_ptr); 644 645 goto record_link_defref (ltype); 646 647 record_link_defref (6): /* either, create-if-not-found */ 648 if type_ptr -> type_pair.ext_ptr = ""b then 649 goto link_has_no_defname; 650 651 if acc_ptr -> based_word = ""b then 652 goto link_has_no_defname; 653 654 record_link_defref (4): /* segname$entry */ 655 record_link_defref (5): /* myself$entry */ 656 link_has_defname: 657 defref_name = acc_string.string; 658 goto record_link_defref_common; 659 660 record_link_defref (1): /* myself$ */ 661 record_link_defref (3): /* segname$ */ 662 link_has_no_defname: 663 defref_name = segref_name || "$"; 664 665 record_link_defref_common: 666 array (array_count) = 667 cref_listman_$create_primary_block_char 668 (defref_name, array (array_count - 1), 669 dir_node, null, ""b, ""b, ""b); 670 671 goto do_next_link; 672 673 record_link_segref (2): /* obsolete, ITB link */ 674 record_link_defref (2): 675 bad_link_type: 676 call cref_filegen_$report_error 677 (0, "cref_analyze_", 678 "Invalid link type ^d found in ""^a""", 679 ltype, module_name); 680 do_next_link: 681 end; 682 end; 683 684 /* format: revert */ 685 686 if array_count > 0 then 687 call cref_listman_$assign_ref_block 688 (array, array_count, component_node); 689 690 return; 691 end; 692 693 end process_component; 694 695 out_of_space: 696 697 dcl explanation char (32); 698 699 call com_err_ (error_table_$noalloc, "cref_analyze_", 700 "Internal table overflow while processing ^a in component ^a", 701 explanation, cref_listman_$get_name (component_node)); 702 signal_abort: 703 signal cref_abort_; 704 goto signal_abort; 705 706 add_bindfile_synonyms: proc; 707 708 dcl name char (32) varying; 709 710 dcl token_pos fixed bin (21), 711 token char (32) varying; 712 713 dcl alphabetics char (84) static options (constant) initial 714 ("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_$0123456789.?/*&^%#@!{}'\|+=-`~"); /* binder and this should take doubled quotes, but since bind dont, we dont have to */ 715 716 dcl i fixed bin; 717 718 dcl master_node pointer; 719 720 dcl is_external bit (1) aligned, 721 no_synonyms bit (1) aligned static; 722 723 if bindfile_char_count = 0 then return; 724 if no_synonyms then return; 725 726 /* Initialize for token parse */ 727 728 token_pos = 1; 729 token = ""; 730 731 /* Scan bindfile until it ends */ 732 733 /* format: ind3 */ 734 735 do while ("1"b); 736 737 /* Find next objectname statement */ 738 739 i = index (substr (bindfile, token_pos), "objectname") - 1; 740 741 if token ^= "objectname" then do; 742 if i < 0 then return; 743 token_pos = token_pos + i + length ("objectname"); 744 end; 745 746 token = get_token (); 747 if token = ":" then do; 748 749 /* Record component name */ 750 751 name = get_token (); 752 753 master_node = 754 cref_listman_$predefine_primary_block_char 755 (name, boundseg_node, dir_node, "1"b, first_pass, 756 check_external_name (name)); 757 758 call flush; /* to a ";" */ 759 760 /* Now search for "synonym:" */ 761 762 token = get_token (); 763 764 do while (token ^= "objectname"); 765 if token ^= "synonym" then call flush; 766 767 else if get_token () ^= ":" then call flush; 768 769 else do; 770 771 token = ","; 772 773 do while (token = ","); 774 token = get_token (); 775 776 if all_names_external then 777 is_external = "1"b; 778 779 else do; 780 do i = 1 to n_external_names 781 while (external_names (i) 782 ^= token); 783 end; 784 785 if i <= n_external_names then 786 is_external = "1"b; 787 else is_external = ""b; 788 end; 789 790 /* Record this synonym */ 791 792 call cref_listman_$create_syn_block 793 (token, boundseg_node, dir_node, 794 is_external, master_node); 795 796 797 token = get_token (); /* "," or ";" */ 798 end; 799 800 if token ^= ";" then do; 801 call com_err_ (0, "cref_analyze_", 802 "Unrecoverable error parsing ^a for ^a", 803 "bindfile", name); 804 goto signal_abort; 805 end; 806 end; 807 808 token = get_token (); 809 end; 810 end; 811 812 end; 813 814 /* format: revert */ 815 816 return_from_syn_search: return; 817 818 flush: proc; 819 820 dcl i fixed bin (21), 821 in_comment bit (1), 822 token char (32) varying; 823 824 i = index (substr (bindfile, token_pos), ";"); 825 if i = 0 then goto return_from_syn_search; 826 827 token_pos = token_pos + i; 828 return; 829 830 get_token: entry returns (char (32) varying); 831 832 dcl separators char (3) static initial (" 833 "); /* NL, tab, SP */ 834 835 in_comment = "1"b; 836 837 do while (in_comment); 838 i = verify (substr (bindfile, token_pos), separators) - 1; 839 if i < 0 then goto return_from_syn_search; 840 token_pos = token_pos + i; 841 842 if substr (bindfile, token_pos, 2) = "/*" then do; 843 i = index (substr (bindfile, token_pos), "*/"); 844 if i = 0 then goto return_from_syn_search; 845 token_pos = token_pos + i + 1; 846 end; 847 848 else in_comment = ""b; 849 end; 850 851 i = verify (substr (bindfile, token_pos), alphabetics) - 1; 852 if i = -1 then i = bindfile_char_count - token_pos + 1; 853 else if i = 0 then i = 1; 854 token = substr (bindfile, token_pos, i); 855 token_pos = token_pos + i; 856 return (token); 857 858 end flush; 859 860 find_bindfile: entry (archive_ptr, archive_name); 861 862 dcl archive_ptr pointer parameter, 863 archive_name char (*) varying; 864 865 dcl header_p pointer, 866 archive_util_$first_disected 867 entry (ptr, ptr, char (32), fixed bin (24), 868 fixed bin (35)), 869 archive_util_$disected_element 870 entry (ptr, ptr, char (32), fixed bin (24), 871 fixed bin (35)); 872 873 dcl code fixed bin (35), 874 bitcount fixed bin (24), 875 component_name char (32), 876 bindfile_ptr pointer static, 877 bindfile char (bindfile_char_count) based (bindfile_ptr); 878 879 880 header_p = archive_ptr; 881 bindfile_char_count = 0; 882 n_external_names = 0; 883 no_synonyms = ""b; 884 all_names_external = make_all_names_external; 885 886 call archive_util_$first_disected 887 (header_p, bindfile_ptr, component_name, bitcount, code); 888 889 /* Find bindfile */ 890 891 do while (code = 0); 892 if index (component_name, ".bind") ^= 0 then 893 code = 1; 894 else call archive_util_$disected_element 895 (header_p, bindfile_ptr, component_name, bitcount, code); 896 end; 897 898 if bindfile_ptr = null then return; 899 900 /* Found bindfile. Examine it. */ 901 902 bindfile_char_count = divide (bitcount, 9, 21, 0); 903 904 if index (bindfile, "synonym") = 0 then 905 no_synonyms = "1"b; 906 907 if all_names_external then return; 908 909 token_pos = 1; 910 token = ""; 911 912 do while (token ^= ":"); 913 914 /* Makes sure we pick up "Addname:", not just "Addname" */ 915 916 do while (get_token () ^= "Addname"); 917 918 /* If we run out of bindfile, get_token will do a non-local return anyway */ 919 920 end; 921 922 token = get_token (); 923 924 if token = ";" then do; /* "Addname;" */ 925 all_names_external = "1"b; 926 return; 927 end; 928 end; 929 930 /* We have an "Addname:" statement. */ 931 932 do while (token ^= ";"); 933 n_external_names = n_external_names + 1; 934 if n_external_names > hbound (external_names, 1) then do; 935 call com_err_ (0, "cref_analyze_", 936 "More than ^d addnames in bindfile for ^a.", 937 n_external_names - 1, archive_name); 938 goto signal_abort; 939 end; 940 941 external_names (n_external_names) = get_token (); 942 token = get_token (); 943 end; 944 945 return; 946 947 check_external_name: entry (testname) returns (bit (1) aligned); 948 949 dcl testname char (*) varying; 950 951 dcl all_names_external bit (1) aligned static; 952 953 if all_names_external then return ("1"b); 954 if bindfile_char_count = 0 then return (""b); 955 956 do i = 1 to n_external_names; 957 if external_names (i) = testname then return ("1"b); 958 end; 959 960 return (""b); 961 end add_bindfile_synonyms; 962 963 contains_suffix: proc (name, suffix) returns (bit (1)); 964 965 dcl (name char (*) varying, 966 suffix char (*)) parameter; 967 968 if length (name) ^> length (suffix) then 969 return ("0"b); 970 if index (name, suffix) ^= 971 length (name) - length (suffix) + 1 then 972 return ("0"b); 973 return ("1"b); 974 end contains_suffix; 975 976 init: entry (first_switch_arg, include_file_switch_arg, search_dir_ptr_arg); 977 978 dcl (first_switch_arg, 979 include_file_switch_arg) bit (1), 980 search_dir_ptr_arg pointer, 981 (first_switch, 982 do_include_files) bit (1) aligned static; 983 dcl (stand_alone_node, 984 non_object_node) pointer static; 985 986 987 /* If first_sw = "1"b, we stop after finding first occurrence of an entryname 988* in any of the search dirs, If not, we seek ALL occurrences. */ 989 990 first_switch = first_switch_arg; 991 992 do_include_files = include_file_switch_arg; 993 search_dir_ptr = search_dir_ptr_arg; 994 995 stand_alone_node = cref_listman_$create_environment 996 ("STAND-ALONE", "1"b); 997 non_object_node = cref_listman_$create_environment 998 ("NON-OBJECT", "1"b); 999 return; 1000 1001 end cref_analyze_; SOURCE FILES USED IN THIS COMPILATION. LINE NUMBER DATE MODIFIED NAME PATHNAME 0 01/11/83 1505.8 cref_analyze_.pl1 >spec>on>01/11/83>cref_analyze_.pl1 176 1 08/05/77 1022.5 object_info.incl.pl1 >ldd>include>object_info.incl.pl1 177 2 10/13/77 1545.6 linkdcl.incl.pl1 >ldd>include>linkdcl.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. acc_ptr 12 014132 automatic pointer level 2 in structure "arg_structure" dcl 101 in procedure "cref_analyze_" set ref 507* acc_ptr 014146 automatic pointer dcl 110 in procedure "cref_analyze_" set ref 604* 623 623 642* 651 654 654 acc_string based structure level 1 dcl 130 acclen based fixed bin(9,0) level 2 packed unsigned unaligned dcl 130 ref 623 654 addr builtin function dcl 136 ref 330 330 386 386 449 449 463 463 463 463 468 515 515 addrel builtin function dcl 136 ref 422 423 541 588 593 593 604 642 all_names_external 000024 internal static bit(1) dcl 951 set ref 776 884* 907 925* 953 alphabetics 000015 constant char(84) initial unaligned dcl 713 ref 851 archive_header based structure level 1 dcl 166 archive_name parameter varying char dcl 862 set ref 860 935* archive_ptr parameter pointer dcl 862 ref 860 880 archive_util_$disected_element 000104 constant entry external dcl 865 ref 894 archive_util_$first_disected 000102 constant entry external dcl 865 ref 886 archive_util_$first_element 000032 constant entry external dcl 36 ref 315 archive_util_$next_element 000034 constant entry external dcl 36 ref 335 arg_structure 014132 automatic structure level 1 dcl 101 set ref 449 449 515 515 array 010030 automatic pointer array dcl 88 set ref 501 507* 520* 532 551* 557* 630 634* 665* 665* 686* array_count 013750 automatic fixed bin(17,0) dcl 88 set ref 492* 499* 499 501 507 520 520* 529* 532 557 557* 572* 628* 628 630 634 665 665 686 686* based_word based bit(36) dcl 164 ref 651 begin_links 6 based bit(18) level 3 packed unaligned dcl 2-30 ref 584 binary builtin function dcl 136 ref 330 330 425 543 576 581 584 597 612 bindfile based char unaligned dcl 873 ref 739 824 838 842 843 851 854 904 bindfile_char_count 000100 automatic fixed bin(24,0) dcl 81 set ref 202* 304 309 723 739 824 838 842 843 851 852 854 881* 902* 904 954 bindfile_ptr 000022 internal static pointer dcl 873 set ref 739 824 838 842 843 851 854 886* 894* 898 904 bitcnt 25 based char(8) level 2 packed unaligned dcl 166 ref 330 330 bitcount 000133 automatic fixed bin(24,0) dcl 873 in procedure "add_bindfile_synonyms" set ref 886* 894* 902 bitcount 014202 automatic fixed bin(24,0) dcl 125 in procedure "cref_analyze_" set ref 224* 345* bitcount parameter fixed bin(24,0) dcl 355 in procedure "process_component" set ref 353 386* bound 24(01) 007742 automatic bit(1) level 3 packed unaligned dcl 86 set ref 401 boundseg_node 014174 automatic pointer dcl 110 set ref 304* 343* 439* 477* 634* 753* 792* branch_info 014266 automatic structure level 1 dcl 363 set ref 463 463 code 000132 automatic fixed bin(35,0) dcl 873 in procedure "add_bindfile_synonyms" set ref 886* 891 892* 894* code 014200 automatic fixed bin(35,0) dcl 110 in procedure "cref_analyze_" set ref 224* 227 238* 246* 255* 315* 316 317* 322 335* 386* 388 390* 463* 466 com_err_ 000026 constant entry external dcl 36 ref 214 246 317 699 801 935 component_name 014120 automatic varying char(32) dcl 92 in procedure "cref_analyze_" set ref 326* 330* 330* component_name 000134 automatic char(32) unaligned dcl 873 in procedure "add_bindfile_synonyms" set ref 886* 892 894* component_node 014172 automatic pointer dcl 110 set ref 393* 439* 477* 507* 520* 557* 686* 699* component_ptr 014156 automatic pointer dcl 110 set ref 313* 315* 326 330 330 330 330 335* cref_abort_ 014226 stack reference condition dcl 142 ref 702 cref_filegen_$report_error 000030 constant entry external dcl 36 ref 390 406 673 cref_listman_$assign_def_block 000062 constant entry external dcl 50 ref 520 cref_listman_$assign_include_file_block 000070 constant entry external dcl 50 ref 557 cref_listman_$assign_ref_block 000064 constant entry external dcl 50 ref 686 cref_listman_$create_environment 000060 constant entry external dcl 50 ref 261 304 430 995 997 cref_listman_$create_include_file_block 000066 constant entry external dcl 50 ref 551 cref_listman_$create_primary_block_acc 000054 constant entry external dcl 50 ref 507 cref_listman_$create_primary_block_char 000050 constant entry external dcl 50 ref 393 439 634 665 cref_listman_$create_syn_block 000056 constant entry external dcl 50 ref 477 792 cref_listman_$get_name 000046 constant entry external dcl 50 ref 699 cref_listman_$predefine_primary_block_char 000052 constant entry external dcl 50 ref 753 data 31 based char(1) level 2 packed unaligned dcl 166 set ref 330 330 decode_definition_$decode_cref 000040 constant entry external dcl 36 ref 449 515 def_offset 1 based bit(18) level 2 packed unaligned dcl 2-41 ref 576 definitions_ptr 014152 automatic pointer dcl 110 set ref 447* 449* 593 593 604 642 defp 4 007742 automatic pointer level 2 dcl 86 set ref 447 defref_name 014214 automatic varying char(32) dcl 128 set ref 654* 660* 665* defs_in_link 0(30) based bit(6) level 2 packed unaligned dcl 2-41 ref 576 dir_idx 014171 automatic fixed bin(18,0) dcl 110 set ref 219* 222 233* dir_node 014176 automatic pointer dcl 110 set ref 261* 393 439* 477* 507* 634* 665* 753* 792* dirname 013752 automatic char(168) unaligned dcl 92 set ref 222* 224* 463* divide builtin function dcl 136 ref 902 do_include_files 000013 internal static bit(1) dcl 978 set ref 527 992* dtm 4 based bit(72) array level 3 dcl 185 set ref 551* empty builtin function dcl 136 ref 372 ename 014024 automatic char(32) unaligned dcl 92 set ref 206* 214* 221 224* 246* 317* 463* 474 ename_arg parameter char unaligned dcl 31 ref 13 206 error_table_$bad_segment 000074 external static fixed bin(35,0) dcl 146 set ref 406* error_table_$noalloc 000072 external static fixed bin(35,0) dcl 146 set ref 699* error_table_$noentry 000076 external static fixed bin(35,0) dcl 146 ref 227 exp_ptr 1 based bit(18) level 2 packed unaligned dcl 2-9 ref 593 exp_word based structure level 1 dcl 2-20 explanation 014241 automatic char(32) unaligned dcl 695 set ref 502* 533* 631* 699* ext_ptr 1(18) based bit(18) level 2 packed unaligned dcl 2-24 ref 642 647 external_names 000101 automatic char(32) array unaligned dcl 83 set ref 780 934 941* 957 first_pass parameter bit(1) dcl 31 set ref 13 246 298 389 406 439* 454 753* first_switch 000012 internal static bit(1) dcl 978 set ref 242 990* first_switch_arg parameter bit(1) unaligned dcl 978 ref 976 990 format 24 007742 automatic structure level 2 dcl 86 ft2 0(30) based bit(6) level 2 packed unaligned dcl 2-9 ref 592 hbound builtin function dcl 136 ref 501 532 630 934 hcs_$initiate_count 000044 constant entry external dcl 36 ref 224 hcs_$status_ 000100 constant entry external dcl 360 ref 463 hcs_$terminate_noname 000042 constant entry external dcl 36 ref 238 255 header based structure level 1 dcl 2-30 header_p 000130 automatic pointer dcl 865 set ref 880* 886* 894* i 020225 automatic fixed bin(17,0) dcl 378 in procedure "process_component" set ref 427* 429 430 430 473* 474 475* 539* 541 543 551 551* i 000156 automatic fixed bin(21,0) dcl 820 in procedure "flush" set ref 824* 825 827 838* 839 840 843* 844 845 851* 852 852* 853 853* 854 855 i 014131 automatic fixed bin(17,0) dcl 99 in procedure "cref_analyze_" set ref 291* 292 292 292 i 000123 automatic fixed bin(17,0) dcl 716 in procedure "add_bindfile_synonyms" set ref 739* 742 743 780* 780* 785 956* 957* in_comment 000157 automatic bit(1) unaligned dcl 820 set ref 835* 837 848* include_file_switch_arg parameter bit(1) unaligned dcl 978 ref 976 992 index builtin function dcl 136 ref 291 427 429 548 739 824 843 892 904 970 is_archive parameter bit(1) dcl 355 ref 353 413 459 is_external 014201 automatic bit(1) dcl 125 in procedure "cref_analyze_" set ref 413* 415* 439* is_external 000126 automatic bit(1) dcl 720 in procedure "add_bindfile_synonyms" set ref 776* 785* 787* 792* item 3 based structure array level 2 dcl 152 j 020226 automatic fixed bin(17,0) dcl 378 set ref 429* 430 430 430 548* 551 551 lang_suffix_node 020230 automatic pointer dcl 381 set ref 419* 430* 439* length builtin function dcl 136 ref 267 267 267 267 284 284 292 743 968 968 970 970 link based structure level 1 dcl 2-9 link_ptr 014164 automatic pointer dcl 110 set ref 588* 592 593 linkage_header_ptr 014150 automatic pointer dcl 110 set ref 446* 449* 576 576 581 584 588 linkage_section_lng 6(18) based bit(18) level 2 packed unaligned dcl 2-41 ref 581 linkp 6 007742 automatic pointer level 2 dcl 86 set ref 446 links_end 014162 automatic fixed bin(18,0) dcl 110 set ref 576* 581* 584 ltype 014170 automatic fixed bin(18,0) dcl 110 set ref 597* 599 600 609 645 673* make_all_names_external based bit(1) level 2 dcl 152 ref 884 map 2 based structure array level 2 dcl 185 master_node 000124 automatic pointer dcl 718 set ref 753* 792* module_name parameter varying char dcl 355 set ref 353 390* 393* 406* 413* 439* 620 673* module_ptr parameter pointer dcl 355 set ref 353 386* n_dirs 2 based fixed bin(17,0) level 2 dcl 152 ref 213 219 n_external_names 007741 automatic fixed bin(17,0) dcl 83 set ref 203* 780 785 882* 933* 933 934 935 941 956 n_names 0(02) 014266 automatic fixed bin(15,0) level 2 packed unaligned dcl 363 set ref 473 485 name 000100 automatic varying char(32) dcl 708 in procedure "add_bindfile_synonyms" set ref 751* 753* 753* 753* 801* name parameter varying char dcl 965 in procedure "contains_suffix" ref 963 968 970 970 name 3 based char(32) level 2 in structure "archive_header" packed unaligned dcl 166 in procedure "cref_analyze_" ref 326 name_area 014272 automatic area(2000) dcl 372 set ref 372* 463 463 468 485 names based char(32) array dcl 374 ref 474 475 485 names_ptr 020212 automatic pointer dcl 374 set ref 468* 474 475 485 names_relp 0(18) 014266 automatic bit(18) level 2 packed unaligned dcl 363 set ref 468 next_def 014132 automatic pointer level 2 dcl 101 set ref 515* no_synonyms 000020 internal static bit(1) dcl 720 set ref 724 883* 904* nomore 014160 automatic bit(1) dcl 110 set ref 449* 494 515* non_object_node 000016 internal static pointer dcl 983 set ref 393* 997* none_found 014161 automatic bit(1) dcl 110 set ref 208* 232* 246 null builtin function dcl 136 ref 205 227 393 393 419 435 515 515 527 634 634 665 665 898 number 1 based fixed bin(17,0) level 2 dcl 185 ref 529 539 object_info based structure level 1 dcl 1-6 object_info_$display 000036 constant entry external dcl 36 ref 386 object_info_version_2 constant fixed bin(17,0) initial dcl 1-60 ref 204 offset 013751 automatic fixed bin(18,0) dcl 88 in procedure "cref_analyze_" set ref 584* 588* offset 2 based bit(18) array level 4 in structure "source_map" packed unaligned dcl 185 in procedure "cref_analyze_" ref 423 541 oi 007742 automatic structure level 1 dcl 86 set ref 386 386 pathname 2 based structure array level 3 packed unaligned dcl 185 pointer builtin function dcl 136 ref 468 reverse builtin function dcl 136 ref 291 292 427 548 rtrim builtin function dcl 136 ref 221 326 475 search builtin function dcl 136 ref 267 search_dir_descriptions 55 based varying char(168) array level 3 dcl 152 ref 233 search_dir_ptr 000010 internal static pointer dcl 162 set ref 213 219 222 233 884 993* search_dir_ptr_arg parameter pointer dcl 978 ref 976 993 search_dir_struc based structure level 1 dcl 152 search_dirs 3 based char(168) array level 3 dcl 152 ref 222 section 6 014132 automatic char(4) level 2 dcl 101 set ref 496 496 seg_ptr 1 based bit(18) level 2 in structure "type_pair" packed unaligned dcl 2-24 in procedure "cref_analyze_" ref 604 612 seg_ptr 014154 automatic pointer dcl 110 in procedure "cref_analyze_" set ref 205* 224* 227 238* 255* 298* 313 345* segref_name 014203 automatic varying char(32) dcl 128 set ref 612* 620* 623* 634* 660 separators 000014 constant char(3) initial unaligned dcl 832 ref 838 size 2(18) based bit(18) array level 4 packed unaligned dcl 185 ref 425 543 source_map 46 007742 automatic fixed bin(17,0) level 2 in structure "oi" dcl 86 in procedure "cref_analyze_" set ref 421 422 source_map based structure level 1 dcl 185 in procedure "cref_analyze_" source_map_p 014234 automatic pointer dcl 195 set ref 422* 423 425 435* 527 529 539 541 543 551 source_path based char unaligned dcl 195 ref 427 429 430 430 548 551 551 source_path_len 014240 automatic fixed bin(17,0) dcl 195 set ref 425* 427 427 429 430 430 543* 548 548 551 551 source_path_ptr 014236 automatic pointer dcl 195 set ref 423* 427 429 430 430 541* 548 551 551 stand_alone_node 000014 internal static pointer dcl 983 set ref 343 995* stats 6 based structure level 2 dcl 2-30 string 0(09) based char level 2 packed unaligned dcl 130 ref 623 654 substr builtin function dcl 136 ref 267 267 276 284 292 429 430 430 551 551 739 824 838 842 843 851 854 suffix parameter char unaligned dcl 965 ref 963 968 970 970 symbp 12 007742 automatic pointer level 2 dcl 86 set ref 422 423 541 testname parameter varying char dcl 949 ref 947 957 token 000112 automatic varying char(32) dcl 710 in procedure "add_bindfile_synonyms" set ref 729* 741 746* 747 762* 764 765 771* 773 774* 780 792* 797* 800 808* 910* 912 922* 924 932 942* token 000160 automatic varying char(32) dcl 820 in procedure "flush" set ref 854* 856 token_pos 000111 automatic fixed bin(21,0) dcl 710 set ref 728* 739 743* 743 824 827* 827 838 840* 840 842 843 845* 845 851 852 854 855* 855 909* type based bit(18) level 2 packed unaligned dcl 2-24 ref 597 type_pair based structure level 1 dcl 2-24 type_ptr 014166 automatic pointer dcl 110 in procedure "cref_analyze_" set ref 593* 597 604 612 642 647 type_ptr based bit(18) level 2 in structure "exp_word" packed unaligned dcl 2-20 in procedure "cref_analyze_" ref 593 varying_addname 020214 automatic varying char(32) dcl 378 set ref 475* 477* varying_dir_description 014045 automatic varying char(168) dcl 92 set ref 233* 261* varying_segname 014034 automatic varying char(32) dcl 92 set ref 221* 267 267 267 267 267 276 282* 284* 284 284 291 292 292* 292 292 298* 304* 345* verify builtin function dcl 136 ref 292 838 851 version_number 007742 automatic fixed bin(17,0) level 2 dcl 86 set ref 204* virgin_linkage_header based structure level 1 dcl 2-41 NAMES DECLARED BY DECLARE STATEMENT AND NEVER REFERENCED. name based structure level 1 dcl 2-57 trap_word based structure level 1 dcl 2-53 NAMES DECLARED BY EXPLICIT CONTEXT. add_bindfile_synonyms 003155 constant entry internal dcl 706 ref 309 bad_link_type 003060 constant label dcl 673 ref 599 600 check_external_name 004113 constant entry internal dcl 947 ref 413 753 753 contains_suffix 004434 constant entry internal dcl 963 ref 282 330 cref_analyze_ 000300 constant entry external dcl 13 crump 000540 constant label dcl 246 ref 227 466 do_next_link 003125 constant label dcl 680 ref 671 find_bindfile 003573 constant entry internal dcl 860 ref 298 flush 004225 constant entry internal dcl 818 ref 758 765 767 get_token 004263 constant entry internal dcl 830 ref 746 751 762 767 774 797 808 916 922 941 942 init 000671 constant entry external dcl 976 link_has_defname 002753 constant label dcl 654 link_has_no_defname 002765 constant label dcl 660 ref 647 651 out_of_space 000606 constant label dcl 695 ref 503 534 632 process_component 001351 constant entry internal dcl 353 ref 330 345 process_segment 000775 constant entry internal dcl 259 ref 236 record_link_defref 000006 constant label array(6) dcl 647 ref 645 record_link_defref_common 003007 constant label dcl 665 set ref 658 record_link_segref 000000 constant label array(6) dcl 612 ref 609 record_link_segref_common 002654 constant label dcl 628 ref 621 return_from_syn_search 003563 constant label dcl 816 ref 825 839 844 returner 000574 constant label dcl 255 signal_abort 000661 constant label dcl 702 ref 216 704 804 938 THERE WERE NO NAMES DECLARED BY CONTEXT OR IMPLICATION. STORAGE REQUIREMENTS FOR THIS PROGRAM. Object Text Link Symbol Defs Static Start 0 0 6034 6142 5435 6044 Length 6446 5435 106 270 377 16 BLOCK NAME STACK SIZE TYPE WHY NONQUICK/WHO SHARES STACK FRAME cref_analyze_ 8721 external procedure is an external procedure. process_segment internal procedure shares stack frame of external procedure cref_analyze_. process_component internal procedure shares stack frame of external procedure cref_analyze_. add_bindfile_synonyms 193 internal procedure calls itself recursively. flush internal procedure shares stack frame of internal procedure add_bindfile_synonyms. contains_suffix internal procedure shares stack frame of external procedure cref_analyze_. STORAGE FOR INTERNAL STATIC VARIABLES. LOC IDENTIFIER BLOCK NAME 000010 search_dir_ptr cref_analyze_ 000012 first_switch cref_analyze_ 000013 do_include_files cref_analyze_ 000014 stand_alone_node cref_analyze_ 000016 non_object_node cref_analyze_ 000020 no_synonyms add_bindfile_synonyms 000022 bindfile_ptr add_bindfile_synonyms 000024 all_names_external add_bindfile_synonyms STORAGE FOR AUTOMATIC VARIABLES. STACK FRAME LOC IDENTIFIER BLOCK NAME add_bindfile_synonyms 000100 name add_bindfile_synonyms 000111 token_pos add_bindfile_synonyms 000112 token add_bindfile_synonyms 000123 i add_bindfile_synonyms 000124 master_node add_bindfile_synonyms 000126 is_external add_bindfile_synonyms 000130 header_p add_bindfile_synonyms 000132 code add_bindfile_synonyms 000133 bitcount add_bindfile_synonyms 000134 component_name add_bindfile_synonyms 000156 i flush 000157 in_comment flush 000160 token flush cref_analyze_ 000100 bindfile_char_count cref_analyze_ 000101 external_names cref_analyze_ 007741 n_external_names cref_analyze_ 007742 oi cref_analyze_ 010030 array cref_analyze_ 013750 array_count cref_analyze_ 013751 offset cref_analyze_ 013752 dirname cref_analyze_ 014024 ename cref_analyze_ 014034 varying_segname cref_analyze_ 014045 varying_dir_description cref_analyze_ 014120 component_name cref_analyze_ 014131 i cref_analyze_ 014132 arg_structure cref_analyze_ 014146 acc_ptr cref_analyze_ 014150 linkage_header_ptr cref_analyze_ 014152 definitions_ptr cref_analyze_ 014154 seg_ptr cref_analyze_ 014156 component_ptr cref_analyze_ 014160 nomore cref_analyze_ 014161 none_found cref_analyze_ 014162 links_end cref_analyze_ 014164 link_ptr cref_analyze_ 014166 type_ptr cref_analyze_ 014170 ltype cref_analyze_ 014171 dir_idx cref_analyze_ 014172 component_node cref_analyze_ 014174 boundseg_node cref_analyze_ 014176 dir_node cref_analyze_ 014200 code cref_analyze_ 014201 is_external cref_analyze_ 014202 bitcount cref_analyze_ 014203 segref_name cref_analyze_ 014214 defref_name cref_analyze_ 014234 source_map_p cref_analyze_ 014236 source_path_ptr cref_analyze_ 014240 source_path_len cref_analyze_ 014241 explanation cref_analyze_ 014266 branch_info process_component 014272 name_area process_component 020212 names_ptr process_component 020214 varying_addname process_component 020225 i process_component 020226 j process_component 020230 lang_suffix_node process_component THE FOLLOWING EXTERNAL OPERATORS ARE USED BY THIS PROGRAM. r_g_a alloc_cs call_ext_out_desc call_ext_out call_int_this_desc call_int_this call_int_other_desc return tra_ext signal shorten_stack ext_entry ext_entry_desc int_entry int_entry_desc set_cs_eis index_cs_eis any_to_any_tr free_based empty THE FOLLOWING EXTERNAL ENTRIES ARE CALLED BY THIS PROGRAM. archive_util_$disected_element archive_util_$first_disected archive_util_$first_element archive_util_$next_element com_err_ cref_filegen_$report_error cref_listman_$assign_def_block cref_listman_$assign_include_file_block cref_listman_$assign_ref_block cref_listman_$create_environment cref_listman_$create_include_file_block cref_listman_$create_primary_block_acc cref_listman_$create_primary_block_char cref_listman_$create_syn_block cref_listman_$get_name cref_listman_$predefine_primary_block_char decode_definition_$decode_cref hcs_$initiate_count hcs_$status_ hcs_$terminate_noname object_info_$display THE FOLLOWING EXTERNAL VARIABLES ARE USED BY THIS PROGRAM. error_table_$bad_segment error_table_$noalloc error_table_$noentry LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC 13 000274 202 000313 203 000314 204 000315 205 000317 206 000321 208 000327 213 000331 214 000335 216 000373 219 000374 221 000402 222 000422 224 000432 227 000474 232 000505 233 000506 236 000517 238 000520 242 000531 244 000534 246 000536 253 000573 255 000574 257 000605 699 000606 702 000661 704 000664 976 000665 990 000676 992 000705 993 000712 995 000715 997 000744 999 000774 259 000775 261 000776 267 001021 276 001041 282 001046 284 001056 291 001064 292 001076 298 001121 304 001141 309 001165 313 001173 315 001175 316 001206 317 001210 319 001246 322 001247 326 001252 330 001273 335 001325 336 001336 337 001337 343 001340 345 001343 349 001350 353 001351 372 001362 386 001365 388 001405 389 001407 390 001413 393 001453 398 001525 401 001526 406 001531 410 001576 413 001577 415 001621 419 001623 421 001625 422 001627 423 001632 425 001637 427 001642 429 001657 430 001675 433 001737 435 001741 439 001743 446 002010 447 002012 449 002014 454 002033 459 002037 463 002043 466 002105 468 002107 473 002115 474 002126 475 002135 477 002171 481 002222 485 002224 492 002232 494 002233 496 002236 499 002243 501 002244 502 002247 503 002252 507 002253 515 002305 518 002326 520 002327 527 002352 529 002361 532 002365 533 002367 534 002372 539 002373 541 002402 543 002412 548 002415 551 002432 555 002474 557 002477 563 002522 572 002523 576 002524 581 002540 584 002547 588 002556 592 002561 593 002565 597 002576 599 002601 600 002603 604 002605 609 002612 612 002615 620 002630 621 002642 623 002643 628 002654 630 002656 631 002661 632 002664 634 002665 642 002736 645 002744 647 002747 651 002751 654 002753 658 002764 660 002765 665 003007 671 003057 673 003060 682 003125 686 003130 690 003153 706 003154 723 003164 724 003176 728 003207 729 003211 739 003212 741 003234 742 003241 743 003252 746 003255 747 003257 751 003264 753 003266 758 003344 762 003345 764 003347 765 003354 767 003363 771 003374 773 003400 774 003405 776 003407 780 003415 783 003435 785 003437 787 003446 792 003447 797 003477 798 003501 800 003502 801 003507 804 003554 808 003557 809 003561 812 003562 816 003563 860 003572 880 003610 881 003614 882 003616 883 003617 884 003621 886 003623 891 003641 892 003643 894 003655 896 003674 898 003675 902 003711 904 003715 907 003725 909 003736 910 003740 912 003741 916 003746 920 003755 922 003756 924 003760 925 003765 926 003770 928 003777 932 004000 933 004005 934 004007 935 004012 938 004062 941 004065 942 004100 943 004102 945 004103 947 004112 953 004127 954 004144 956 004160 957 004167 958 004212 960 004214 818 004225 824 004230 825 004252 827 004253 828 004254 830 004263 835 004266 837 004270 838 004272 839 004314 840 004315 842 004316 843 004323 844 004341 845 004342 846 004345 848 004346 849 004347 851 004350 852 004372 853 004401 854 004405 855 004414 856 004416 963 004434 968 004452 970 004463 973 004504 ----------------------------------------------------------- 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