COMPILATION LISTING OF SEGMENT create_data_segment_ Compiled by: Multics PL/I Compiler, Release 32f, of October 9, 1989 Compiled at: Adv Computing Technology Centre Compiled on: 05/17/90 1511.5 mdt Thu Options: optimize map 1 /****^ *********************************************************** 2* * * 3* * Copyright, (C) BULL HN Information Systems Inc., 1990 * 4* * * 5* * Copyright, (C) Honeywell Information Systems Inc., 1982 * 6* * * 7* * Copyright (c) 1972 by Massachusetts Institute of * 8* * Technology and Honeywell Information Systems, Inc. * 9* * * 10* *********************************************************** */ 11 12 13 14 15 /****^ HISTORY COMMENTS: 16* 1) change(86-05-02,Elhard), approve(86-05-02,MCR7391), 17* audit(86-09-04,DGHowe), install(86-11-20,MR12.0-1222): 18* Modified to fix definition threading to not thread definition header into 19* backward definition thread and overwrite msf_map_relp value in def header. 20* 2) change(90-04-23,Huen), approve(90-04-23,MCR8166), audit(90-04-27,Gray), 21* install(90-05-17,MR12.4-1009): 22* lang_13: Warn users if a level 2 element which is not aligned on a word 23* boundary is used. 24* END HISTORY COMMENTS */ 25 26 27 /* create_data_segment_: A standard object segment generator which uses 28* runtime pl1 structure definitions as templates for defining data segment 29* segdefs. 30* 31* Oct. 15, 1975 by Bernard S. Greenberg. 32* Even source map bug, random pad words fixed 7/30/76 by BSG 33* Runtime symbol simple bit treated properly -- 12/16/76 BSG 34* improved searching for block using return ptr -- 11/07/78 JRDavis 35* Fixed bug in creating data segments without text sections -- 2 Oct 1980 Chris Jones 36* Fixed bug in call to stu_$decode_runtime_value -- 8 October 1980 M. N. Davidoff 37* Changed to use date_time_$format -- 06/19/84 J A Falksen 38**/ 39 /* format: style2 */ 40 create_data_segment_: 41 procedure (infoptr, rcode); 42 43 dcl rcode fixed bin (35); 44 dcl myname char (32) internal static options (constant) init ("create_data_segment_"); 45 dcl (infop, infoptr) ptr; 46 dcl stucode fixed bin; 47 dcl (slen, tlen, llen) fixed bin (19); 48 dcl movdef bit (1) aligned; 49 dcl (hp, smp, osmp, osymp, defp, class3ptr) 50 ptr; 51 dcl ( 52 DEF init (1), 53 DEFR init (2), 54 LNKR init (3), 55 SYMR init (4), 56 TXTR init (5) 57 ) fixed bin internal static options (constant); 58 59 dcl scrps (5) ptr; 60 dcl 1 relinfo aligned based, 61 2 decl_version fixed bin, 62 2 n_bits fixed bin; 63 64 dcl 1 rloc aligned based (rlocp), 65 2 words (0:9999) unal, 66 3 (l, r) bit (18); 67 68 dcl 1 vrloc aligned based (ptr (rlocp, next)) like rloc; 69 dcl rp ptr, 70 b18u bit (18) unaligned based; 71 72 dcl (putp, rlocp) ptr; 73 dcl 1 acc aligned based, 74 2 acc1 unal, 75 3 acclen fixed bin (8) unal, 76 3 accstr char (4 refer (acc.acclen)) unal; 77 dcl (tptr, sptr, lptr) ptr; 78 dcl error_table_$translation_failed 79 external fixed bin (35); 80 dcl tssi_$get_segment entry (char (*), char (*), ptr, ptr, fixed bin (35)); 81 dcl get_temp_segments_ entry (char (*), (*) ptr, fixed bin (35)); 82 dcl release_temp_segments_ entry (char (*), (*) ptr, fixed bin (35)); 83 dcl get_wdir_ entry returns (char (168)); 84 dcl match_star_name_ entry (char (*), char (*), fixed bin (35)); 85 dcl check_star_name_$entry entry (char (*), fixed bin (35)); 86 dcl tssi_$finish_segment entry (ptr, fixed bin (24), bit (36) aligned, ptr, fixed bin (35)); 87 dcl (now, dtmc) fixed bin (71); 88 dcl object_info_$brief entry (ptr, fixed bin (24), ptr, fixed bin (35)); 89 dcl 1 oi like object_info aligned; 90 dcl strptr ptr; 91 dcl i fixed bin; 92 dcl hcs_$status_mins entry (ptr, fixed bin (2), fixed bin (24), fixed bin (35)); 93 dcl tssi_$clean_up_segment entry (ptr); 94 dcl cleanup condition; 95 96 dcl sgp ptr, 97 aclip ptr; 98 dcl dhp ptr; 99 dcl (opp, smrcp) ptr; 100 dcl copy (copylen) bit (36) aligned based; 101 dcl copylen fixed bin (19); 102 dcl wordl fixed bin; 103 dcl n fixed bin; 104 dcl bc fixed bin (24); 105 dcl get_group_id_ entry returns (char (32)); 106 dcl prevdef ptr; 107 dcl pv ptr; 108 dcl next fixed bin (18); 109 dcl ojnxt fixed bin (18); 110 dcl zeroword fixed bin (18); 111 dcl bword bit (36) based; 112 dcl strcopy char (copylen) based; 113 dcl strcopy1 char (strcopy1l) based (strc1p); 114 dcl strc1p ptr; 115 dcl strcopy1l fixed bin; 116 dcl oname char (32); 117 118 dcl stu_$get_runtime_block entry (ptr, ptr, ptr, fixed bin (18)); 119 dcl (header_ptr, block_ptr) 120 ptr; 121 dcl (tnode, lnode, snode) ptr; 122 dcl cp ptr; 123 dcl code fixed bin (35); 124 dcl date_time_$format entry (char (*), fixed bin (71), char (*), char (*)) returns (char (250) var); 125 126 dcl com_err_ entry options (variable); 127 dcl stu_$find_runtime_symbol 128 entry (ptr, char (*) aligned, ptr, fixed bin) returns (ptr); 129 dcl stu_$decode_runtime_value 130 entry (fixed bin (35), ptr, ptr, ptr, ptr, ptr, fixed bin) 131 returns (fixed bin (35)); 132 dcl (addr, addrel, bin, bit, clock, codeptr, divide, fixed, length, mod, null, ptr, rel, rtrim, size, 133 stackframeptr, substr, unspec) 134 builtin; 135 dcl (lsize, sysize, tsize, dsize, ssize) 136 fixed bin (18); 137 dcl (srel, lrel, drel, syrel) 138 fixed bin (18); 139 1 1 /* BEGIN INCLUDE FILE cds_args.incl.pl1 */ 1 2 1 3 dcl 1 cds_args based aligned, 1 4 2 sections (2), 1 5 3 p ptr, /* pointer to data for text/static section */ 1 6 3 len fixed bin (18), /* size of text/static section */ 1 7 3 struct_name char (32), /* name of declared structure for this section */ 1 8 2 seg_name char (32), /* name to create segment by */ 1 9 2 num_exclude_names fixed bin, /* number of names in exclude array */ 1 10 2 exclude_array_ptr ptr, /* pointer to array of exclude names */ 1 11 2 switches, /* control switches */ 1 12 3 defs_in_link bit (1) unal, /* says put defs in linkage */ 1 13 3 separate_static bit (1) unal, /* says separate static section is wanted */ 1 14 3 have_text bit (1) unal, /* ON if text section given */ 1 15 3 have_static bit (1) unal, /* ON if static section given */ 1 16 3 pad bit (32) unal; 1 17 1 18 dcl exclude_names (1) char (32) based; /* pointed to be cds_args.exclude_array_ptr */ 1 19 1 20 /* END INCLUDE FILE cds_args.incl.pl1 */ 140 2 1 /* BEGIN INCLUDE FILE ... stack_frame.incl.pl1 ... */ 2 2 2 3 /* format: off */ 2 4 2 5 /* Modified: 16 Dec 1977, D. Levin - to add fio_ps_ptr and pl1_ps_ptr */ 2 6 /* Modified: 3 Feb 1978, P. Krupp - to add run_unit_manager bit & main_proc bit */ 2 7 /* Modified: 21 March 1978, D. Levin - change fio_ps_ptr to support_ptr */ 2 8 /* Modified: 03/01/84, S. Herbst - Added RETURN_PTR_MASK */ 2 9 2 10 2 11 /****^ HISTORY COMMENTS: 2 12* 1) change(86-09-15,Kissel), approve(86-09-15,MCR7473), 2 13* audit(86-10-01,Fawcett), install(86-11-03,MR12.0-1206): 2 14* Modified to add constants for the translator_id field in the stack_frame 2 15* structure. 2 16* END HISTORY COMMENTS */ 2 17 2 18 2 19 dcl RETURN_PTR_MASK bit (72) int static options (constant) /* mask to be AND'd with stack_frame.return_ptr */ 2 20 init ("777777777777777777000000"b3); /* when copying, to ignore bits that a call fills */ 2 21 /* with indicators (nonzero for Fortran hexfp caller) */ 2 22 /* say: unspec(ptr) = unspec(stack_frame.return_ptr) & RETURN_PTR_MASK; */ 2 23 2 24 dcl TRANSLATOR_ID_PL1V2 bit (18) internal static options (constant) init ("000000"b3); 2 25 dcl TRANSLATOR_ID_ALM bit (18) internal static options (constant) init ("000001"b3); 2 26 dcl TRANSLATOR_ID_PL1V1 bit (18) internal static options (constant) init ("000002"b3); 2 27 dcl TRANSLATOR_ID_SIGNAL_CALLER bit (18) internal static options (constant) init ("000003"b3); 2 28 dcl TRANSLATOR_ID_SIGNALLER bit (18) internal static options (constant) init ("000004"b3); 2 29 2 30 2 31 dcl sp pointer; /* pointer to beginning of stack frame */ 2 32 2 33 dcl stack_frame_min_length fixed bin static init(48); 2 34 2 35 2 36 dcl 1 stack_frame based(sp) aligned, 2 37 2 pointer_registers(0 : 7) ptr, 2 38 2 prev_sp pointer, 2 39 2 next_sp pointer, 2 40 2 return_ptr pointer, 2 41 2 entry_ptr pointer, 2 42 2 operator_and_lp_ptr ptr, /* serves as both */ 2 43 2 arg_ptr pointer, 2 44 2 static_ptr ptr unaligned, 2 45 2 support_ptr ptr unal, /* only used by fortran I/O */ 2 46 2 on_unit_relp1 bit(18) unaligned, 2 47 2 on_unit_relp2 bit(18) unaligned, 2 48 2 translator_id bit(18) unaligned, /* Translator ID (see constants above) 2 49* 0 => PL/I version II 2 50* 1 => ALM 2 51* 2 => PL/I version I 2 52* 3 => signal caller frame 2 53* 4 => signaller frame */ 2 54 2 operator_return_offset bit(18) unaligned, 2 55 2 x(0: 7) bit(18) unaligned, /* index registers */ 2 56 2 a bit(36), /* accumulator */ 2 57 2 q bit(36), /* q-register */ 2 58 2 e bit(36), /* exponent */ 2 59 2 timer bit(27) unaligned, /* timer */ 2 60 2 pad bit(6) unaligned, 2 61 2 ring_alarm_reg bit(3) unaligned; 2 62 2 63 2 64 dcl 1 stack_frame_flags based(sp) aligned, 2 65 2 pad(0 : 7) bit(72), /* skip over prs */ 2 66 2 xx0 bit(22) unal, 2 67 2 main_proc bit(1) unal, /* on if frame belongs to a main procedure */ 2 68 2 run_unit_manager bit(1) unal, /* on if frame belongs to run unit manager */ 2 69 2 signal bit(1) unal, /* on if frame belongs to logical signal_ */ 2 70 2 crawl_out bit(1) unal, /* on if this is a signal caller frame */ 2 71 2 signaller bit(1) unal, /* on if next frame is signaller's */ 2 72 2 link_trap bit(1) unal, /* on if this frame was made by the linker */ 2 73 2 support bit(1) unal, /* on if frame belongs to a support proc */ 2 74 2 condition bit(1) unal, /* on if condition established in this frame */ 2 75 2 xx0a bit(6) unal, 2 76 2 xx1 fixed bin, 2 77 2 xx2 fixed bin, 2 78 2 xx3 bit(25) unal, 2 79 2 old_crawl_out bit (1) unal, /* on if this is a signal caller frame */ 2 80 2 old_signaller bit(1) unal, /* on if next frame is signaller's */ 2 81 2 xx3a bit(9) unaligned, 2 82 2 xx4(9) bit(72) aligned, 2 83 2 v2_pl1_op_ret_base ptr, /* When a V2 PL/I program calls an operator the 2 84* * operator puts a pointer to the base of 2 85* * the calling procedure here. (text base ptr) */ 2 86 2 xx5 bit(72) aligned, 2 87 2 pl1_ps_ptr ptr; /* ptr to ps for this frame; also used by fio. */ 2 88 2 89 /* format: on */ 2 90 2 91 /* END INCLUDE FILE ... stack_frame.incl.pl1 */ 141 3 1 /* BEGIN INCLUDE FILE definition.incl.pl1 */ 3 2 3 3 3 4 3 5 /****^ HISTORY COMMENTS: 3 6* 1) change(86-05-02,Elhard), approve(86-05-02,MCR7391), 3 7* audit(86-07-18,DGHowe), install(86-11-20,MR12.0-1222): 3 8* Modified to add indirect bit to definition flags. 3 9* END HISTORY COMMENTS */ 3 10 3 11 3 12 dcl 1 definition aligned based, 3 13 2 forward unal bit(18), /* offset of next def */ 3 14 2 backward unal bit(18), /* offset of previous def */ 3 15 2 value unal bit(18), 3 16 2 flags unal, 3 17 3 new bit(1), 3 18 3 ignore bit(1), 3 19 3 entry bit(1), 3 20 3 retain bit(1), 3 21 3 argcount bit(1), 3 22 3 descriptors bit(1), 3 23 3 indirect bit(1), 3 24 3 unused bit(8), 3 25 2 class unal bit(3), 3 26 2 symbol unal bit(18), /* offset of ACC for symbol */ 3 27 2 segname unal bit(18); /* offset of segname def */ 3 28 3 29 /* END INCLUDE FILE definition.incl.pl1 */ 142 4 1 /* BEGIN INCLUDE FILE segname_def.incl.pl1 */ 4 2 4 3 dcl 1 segname_def aligned based, 4 4 2 forward unal bit(18), /* offset of next def */ 4 5 2 backward unal bit(18), /* offset of previous def */ 4 6 2 next unal bit(18), /* offset of next segname def */ 4 7 2 flags unal, 4 8 3 new bit(1), 4 9 3 ignore bit(1), 4 10 3 entry bit(1), 4 11 3 retain bit(1), 4 12 3 descriptors bit(1), 4 13 3 unused bit(10), 4 14 2 class unal bit(3), 4 15 2 symbol unal bit(18), /* offset of ACC for symbol */ 4 16 2 defblock unal bit(18); /* offset of head of this defblock */ 4 17 4 18 /* END INCLUDE FILE segname_def.incl.pl1 */ 143 5 1 /* BEGIN INCLUDE FILE ... source_map.incl.pl1 */ 5 2 5 3 dcl 1 source_map aligned based, 5 4 2 version fixed bin, 5 5 2 number fixed bin, 5 6 2 map(n refer(source_map.number)) aligned, 5 7 3 pathname unaligned, 5 8 4 offset bit(18), 5 9 4 size bit(18), 5 10 3 uid bit(36), 5 11 3 dtm fixed bin(71); 5 12 5 13 /* END INCLUDE FILE ... source_map.incl.pl1 */ 144 6 1 /* BEGIN INCLUDE FILE relbts.incl.pl1 */ 6 2 6 3 /* This include file defines the relocation bits as bit (18) entities. See 6 4* also relocation_bits.incl.pl1 and reloc_lower.incl.pl1. */ 6 5 6 6 dcl ( rc_a initial("0"b), /* absolute */ 6 7 rc_t initial("000000000000010000"b), /* text */ 6 8 rc_nt initial("000000000000010001"b), /* negative text */ 6 9 rc_lp18 initial("000000000000010010"b), /* linkage, 18 bit */ 6 10 rc_nlp18 initial("000000000000010011"b), /* negative link, 18 bit */ 6 11 rc_lp15 initial("000000000000010100"b), /* linkage, 15 bit */ 6 12 rc_dp initial("000000000000010101"b), /* def section */ 6 13 rc_s initial("000000000000010110"b), /* symbol segment */ 6 14 rc_ns initial("000000000000010111"b), /* negative symbol */ 6 15 rc_is18 initial("000000000000011000"b), /* internal static 18 */ 6 16 rc_is15 initial("000000000000011001"b), /* internal static 15 */ 6 17 rc_lb initial("000000000000011000"b), /* link block */ 6 18 rc_nlb initial("000000000000011001"b), /* negative link block */ 6 19 rc_sr initial("000000000000011010"b), /* self relative */ 6 20 rc_e initial("000000000000011111"b)) /* escape */ 6 21 bit(18) internal static options(constant); 6 22 6 23 dcl ( rc_dp_dp initial("000000000000010101000000000000010101"b), /* def section, def section */ 6 24 rc_a_dp initial("000000000000000000000000000000010101"b)) /* absolute, def section */ 6 25 bit(36) internal static options(constant); 6 26 6 27 /* END INCLUDE FILE relbts.incl.pl1 */ 145 7 1 /* BEGIN INCLUDE FILE ... object_info.incl.pl1 7 2*coded February 8, 1972 by Michael J. Spier */ 7 3 /* modified May 26, 1972 by M. Weaver */ 7 4 /* modified 15 April, 1975 by M. Weaver */ 7 5 7 6 declare 1 object_info aligned based, /* structure containing object info based, returned by object_info_ */ 7 7 2 version_number fixed bin, /* version number of current structure format (=2) */ 7 8 2 textp pointer, /* pointer to beginning of text section */ 7 9 2 defp pointer, /* pointer to beginning of definition section */ 7 10 2 linkp pointer, /* pointer to beginning of linkage section */ 7 11 2 statp pointer, /* pointer to beginning of static section */ 7 12 2 symbp pointer, /* pointer to beginning of symbol section */ 7 13 2 bmapp pointer, /* pointer to beginning of break map (may be null) */ 7 14 2 tlng fixed bin, /* length in words of text section */ 7 15 2 dlng fixed bin, /* length in words of definition section */ 7 16 2 llng fixed bin, /* length in words of linkage section */ 7 17 2 ilng fixed bin, /* length in words of static section */ 7 18 2 slng fixed bin, /* length in words of symbol section */ 7 19 2 blng fixed bin, /* length in words of break map */ 7 20 2 format, /* word containing bit flags about object type */ 7 21 3 old_format bit(1) unaligned, /* on if segment isn't in new format, i.e. has old style object map */ 7 22 3 bound bit(1) unaligned, /* on if segment is bound */ 7 23 3 relocatable bit(1) unaligned, /* on if seg has relocation info in its first symbol block */ 7 24 3 procedure bit(1) unaligned, /* on if segment is an executable object program */ 7 25 3 standard bit(1) unaligned, /* on if seg is in standard format (more than just standard map) */ 7 26 3 gate bit(1) unaligned, /* on if segment is a gate */ 7 27 3 separate_static bit(1) unaligned, /* on if static not in linkage */ 7 28 3 links_in_text bit(1) unaligned, /* on if there are threaded links in text */ 7 29 3 perprocess_static bit (1) unaligned, /* on if static is not to be per run unit */ 7 30 3 pad bit(27) unaligned, 7 31 2 entry_bound fixed bin, /* entry bound if segment is a gate */ 7 32 2 textlinkp pointer, /* ptr to first link in text */ 7 33 7 34 /* LIMIT OF BRIEF STRUCTURE */ 7 35 7 36 2 compiler char(8) aligned, /* name of processor which generated segment */ 7 37 2 compile_time fixed bin(71), /* clock reading of date/time object was generated */ 7 38 2 userid char(32) aligned, /* standard Multics id of creator of object segment */ 7 39 2 cvers aligned, /* generator version name in printable char string form */ 7 40 3 offset bit(18) unaligned, /* offset of name in words relative to base of symbol section */ 7 41 3 length bit(18) unaligned, /* length of name in characters */ 7 42 2 comment aligned, /* printable comment concerning generator or generation of segment */ 7 43 3 offset bit(18) unaligned, /* offset of comment in words relative to base of symbol section */ 7 44 3 length bit(18) unaligned, /* length of comment in characters */ 7 45 2 source_map fixed bin, /* offset, relative to base of symbol section, of source map structure */ 7 46 7 47 /* LIMIT OF DISPLAY STRUCTURE */ 7 48 7 49 2 rel_text pointer, /* pointer to text section relocation info */ 7 50 2 rel_def pointer, /* pointer to definition section relocation info */ 7 51 2 rel_link pointer, /* pointer to linkage section relocation info */ 7 52 2 rel_static pointer, /* pointer to static section relocation info */ 7 53 2 rel_symbol pointer, /* pointer to symbol section relocation info */ 7 54 2 text_boundary fixed bin, /* specifies mod of text section base boundary */ 7 55 2 static_boundary fixed bin, /* specifies mod of internal static base boundary */ 7 56 /* currently not used by system */ 7 57 2 default_truncate fixed bin, /* offset rel to symbp for binder to automatically trunc. symb sect. */ 7 58 2 optional_truncate fixed bin; /* offset rel to symbp for binder to optionally trunc. symb sect. */ 7 59 7 60 declare object_info_version_2 fixed bin int static init(2); 7 61 7 62 /* END INCLUDE FILE ... object_info.incl.pl1 */ 146 8 1 /* BEGIN INCLUDE FILE ... object_map.incl.pl1 */ 8 2 /* coded February 8, 1972 by Michael J. Spier */ 8 3 /* Last modified on 05/20/72 at 13:29:38 by R F Mabee. */ 8 4 /* Made to agree with Spier's document on 20 May 1972 by R F Mabee. */ 8 5 /* modified on 6 May 1972 by R F Mabee to add map_ptr at end of object map. */ 8 6 /* modified May, 1972 by M. Weaver */ 8 7 /* modified 5/75 by E. Wiatrowski and 6/75 by M. Weaver */ 8 8 /* modified 5/77 by M. Weaver to add perprocess_static bit */ 8 9 8 10 declare 1 object_map aligned based, /* Structure describing standard object map */ 8 11 8 12 2 decl_vers fixed bin, /* Version number of current structure format */ 8 13 2 identifier char (8) aligned, /* Must be the constant "obj_map" */ 8 14 2 text_offset bit (18) unaligned, /* Offset relative to base of object segment of base of text section */ 8 15 2 text_length bit (18) unaligned, /* Length in words of text section */ 8 16 2 definition_offset bit (18) unaligned, /* Offset relative to base of object seg of base of definition section */ 8 17 2 definition_length bit (18) unaligned, /* Length in words of definition section */ 8 18 2 linkage_offset bit (18) unaligned, /* Offset relative to base of object seg of base of linkage section */ 8 19 2 linkage_length bit (18) unaligned, /* Length in words of linkage section */ 8 20 2 static_offset bit (18) unaligned, /* Offset relative to base of obj seg of static section */ 8 21 2 static_length bit (18) unaligned, /* Length in words of static section */ 8 22 2 symbol_offset bit (18) unaligned, /* Offset relative to base of object seg of base of symbol section */ 8 23 2 symbol_length bit (18) unaligned, /* Length in words of symbol section */ 8 24 2 break_map_offset bit (18) unaligned, /* Offset relative to base of object seg of base of break map */ 8 25 2 break_map_length bit (18) unaligned, /* Length in words of break map */ 8 26 2 entry_bound bit (18) unaligned, /* Offset in text of last gate entry */ 8 27 2 text_link_offset bit (18) unaligned, /* Offset of first text-embedded link */ 8 28 2 format aligned, /* Word containing bit flags about object type */ 8 29 3 bound bit (1) unaligned, /* On if segment is bound */ 8 30 3 relocatable bit (1) unaligned, /* On if segment has relocation info in its first symbol block */ 8 31 3 procedure bit (1) unaligned, /* On if segment is an executable object program */ 8 32 3 standard bit (1) unaligned, /* On if segment is in standard format (more than just standard map) */ 8 33 3 separate_static bit(1) unaligned, /* On if static is a separate section from linkage */ 8 34 3 links_in_text bit (1) unaligned, /* On if there are text-embedded links */ 8 35 3 perprocess_static bit (1) unaligned, /* On if static is not to be per run unit */ 8 36 3 unused bit (29) unaligned; /* Reserved */ 8 37 8 38 declare map_ptr bit(18) aligned based; /* Last word of the segment. It points to the base of the object map. */ 8 39 8 40 declare object_map_version_2 fixed bin static init(2); 8 41 8 42 /* END INCLUDE FILE ... object_map.incl.pl1 */ 147 9 1 /* BEGIN INCLUDE FILE linkdcl.incl.pl1 --- last modified 15 Nov 1971 by C Garman */ 9 2 9 3 /* Last Modified (Date and Reason): 9 4* 6/75 by M.Weaver to add virgin_linkage_header declaration 9 5* 6/75 by S.Webber to comment existing structures better 9 6* 9/77 by M. Weaver to add run_depth to link 9 7* 2/83 by M. Weaver to add linkage header flags and change run_depth precision 9 8**/ 9 9 9 10 /* format: style3 */ 9 11 dcl 1 link based aligned, /* link pair in linkage section */ 9 12 2 head_ptr bit (18) unal, /* rel pointer to beginning of linkage section */ 9 13 2 ringno bit (3) unal, 9 14 2 mbz bit (6) unal, 9 15 2 run_depth fixed bin (2) unal, /* run unit depth, filled when link is snapped */ 9 16 2 ft2 bit (6) unal, /* fault tag. 46(8) if not snapped, 43(8) if snapped */ 9 17 2 exp_ptr bit (18) unal, /* pointer (rel to defs) of expression word */ 9 18 2 mbz2 bit (12) unal, 9 19 2 modifier bit (6) unal; /* modifier to be left in snapped link */ 9 20 9 21 dcl 1 exp_word based aligned, /* expression word in link definition */ 9 22 2 type_ptr bit (18) unal, /* pointer (rel to defs) of type pair structure */ 9 23 2 exp bit (18) unal; /* constant expression to be added in when snapping link */ 9 24 9 25 dcl 1 type_pair based aligned, /* type pair in link definition */ 9 26 2 type bit (18) unal, /* type of link. may be 1,2,3,4,5, or 6 */ 9 27 2 trap_ptr bit (18) unal, /* pointer (rel to defs) to the trap word */ 9 28 2 seg_ptr bit (18) unal, /* pointer to ACC reference name for segment referenced */ 9 29 2 ext_ptr bit (18) unal; /* pointer (rel to defs) of ACC segdef name */ 9 30 9 31 dcl 1 header based aligned, /* linkage block header */ 9 32 2 def_ptr ptr, /* pointer to definition section */ 9 33 2 symbol_ptr ptr unal, /* pointer to symbol section in object segment */ 9 34 2 original_linkage_ptr 9 35 ptr unal, /* pointer to linkage section in object segment */ 9 36 2 unused bit (72), 9 37 2 stats, 9 38 3 begin_links bit (18) unal, /* offset (rel to this section) of first link */ 9 39 3 block_length bit (18) unal, /* number of words in this linkage section */ 9 40 3 segment_number 9 41 bit (18) unal, /* text segment number associated with this section */ 9 42 3 static_length bit (18) unal; /* number of words of static for this segment */ 9 43 9 44 dcl 1 linkage_header_flags 9 45 aligned based, /* overlay of def_ptr for flags */ 9 46 2 pad1 bit (28) unaligned, /* flags are in first word */ 9 47 2 static_vlas bit (1) unaligned, /* static section "owns" some LA/VLA segments */ 9 48 2 perprocess_static 9 49 bit (1) unaligned, /* 1 copy of static section is used by all tasks/run units */ 9 50 2 pad2 bit (6) unaligned; 9 51 9 52 dcl 1 virgin_linkage_header 9 53 aligned based, /* template for linkage header in object segment */ 9 54 2 pad bit (30) unaligned, /* is filled in by linker */ 9 55 2 defs_in_link bit (6) unaligned, /* =o20 if defs in linkage (nonstandard) */ 9 56 2 def_offset bit (18) unaligned, /* offset of definition section */ 9 57 2 first_ref_relp bit (18) unaligned, /* offset of trap-at-first-reference offset array */ 9 58 2 filled_in_later bit (144), 9 59 2 link_begin bit (18) unaligned, /* offset of first link */ 9 60 2 linkage_section_lng 9 61 bit (18) unaligned, /* length of linkage section */ 9 62 2 segno_pad bit (18) unaligned, /* will be segment number of copied linkage */ 9 63 2 static_length bit (18) unaligned; /* length of static section */ 9 64 9 65 9 66 dcl 1 trap_word based aligned, /* trap word in link definition */ 9 67 2 call_ptr bit (18) unal, /* pointer (rel to link) of link to trap procedure */ 9 68 2 arg_ptr bit (18) unal; /* pointer (rel to link) of link to arg info for trap proc */ 9 69 9 70 dcl 1 name based aligned, /* storage of ASCII names in definitions */ 9 71 2 nchars bit (9) unaligned, /* number of characters in name */ 9 72 2 char_string char (31) unaligned; /* 31-character name */ 9 73 9 74 /* END INCLUDE FILE linkdcl.incl.pl1 */ 148 10 1 dcl 1 std_symbol_header based aligned, 10 2 2 dcl_version fixed bin, 10 3 2 identifier char(8), 10 4 2 gen_number fixed bin, 10 5 2 gen_created fixed bin(71), 10 6 2 object_created fixed bin(71), 10 7 2 generator char(8), 10 8 2 gen_version unaligned, 10 9 3 offset bit(18), 10 10 3 size bit(18), 10 11 2 userid unaligned, 10 12 3 offset bit(18), 10 13 3 size bit(18), 10 14 2 comment unaligned, 10 15 3 offset bit(18), 10 16 3 size bit(18), 10 17 2 text_boundary bit(18) unaligned, 10 18 2 stat_boundary bit(18) unaligned, 10 19 2 source_map bit(18) unaligned, 10 20 2 area_pointer bit(18) unaligned, 10 21 2 backpointer bit(18) unaligned, 10 22 2 block_size bit(18) unaligned, 10 23 2 next_block bit(18) unaligned, 10 24 2 rel_text bit(18) unaligned, 10 25 2 rel_def bit(18) unaligned, 10 26 2 rel_link bit(18) unaligned, 10 27 2 rel_symbol bit(18) unaligned, 10 28 2 mini_truncate bit(18) unaligned, 10 29 2 maxi_truncate bit(18) unaligned; 149 11 1 /* BEGIN INCLUDE FILE ... runtime_symbol.incl.pl1 ... Modified 07/79 */ 11 2 11 3 dcl 1 runtime_symbol aligned based, 11 4 2 flag unal bit(1), /* always "1"b for Version II */ 11 5 2 use_digit unal bit(1), /* if "1"b and units are half words units are really digits */ 11 6 2 array_units unal bit(2), 11 7 2 units unal bit(2), /* addressing units */ 11 8 2 type unal bit(6), /* data type */ 11 9 2 level unal bit(6), /* structure level */ 11 10 2 ndims unal bit(6), /* number of dimensions */ 11 11 2 bits unal, 11 12 3 aligned bit(1), 11 13 3 packed bit(1), 11 14 3 simple bit(1), 11 15 2 skip unal bit(1), 11 16 2 scale unal bit(8), /* arithmetic scale factor */ 11 17 2 name unal bit(18), /* rel ptr to acc name */ 11 18 2 brother unal bit(18), /* rel ptr to brother entry */ 11 19 2 father unal bit(18), /* rel ptr to father entry */ 11 20 2 son unal bit(18), /* rel ptr to son entry */ 11 21 2 address unal, 11 22 3 location bit(18), /* location in storage class */ 11 23 3 class bit(4), /* storage class */ 11 24 3 next bit(14), /* rel ptr to next of same class */ 11 25 2 size fixed bin(35), /* encoded string|arith size */ 11 26 2 offset fixed bin(35), /* encoded offset from address */ 11 27 2 virtual_org fixed bin(35), 11 28 2 bounds(1), 11 29 3 lower fixed bin(35), /* encoded lower bound */ 11 30 3 upper fixed bin(35), /* encoded upper bound */ 11 31 3 multiplier fixed bin(35); /* encoded multiplier */ 11 32 11 33 dcl 1 runtime_bound based, 11 34 2 lower fixed bin(35), 11 35 2 upper fixed bin(35), 11 36 2 multiplier fixed bin(35); 11 37 11 38 dcl 1 runtime_block aligned based, 11 39 2 flag unal bit(1), /* always "1"b for Version II */ 11 40 2 quick unal bit(1), /* "1"b if quick block */ 11 41 2 fortran unal bit(1), /* "1"b if fortran program */ 11 42 2 standard unal bit(1), /* "1"b if program has std obj segment */ 11 43 2 owner_flag unal bit(1), /* "1"b if block has valid owner field */ 11 44 2 skip unal bit(1), 11 45 2 type unal bit(6), /* = 0 for a block node */ 11 46 2 number unal bit(6), /* begin block number */ 11 47 2 start unal bit(18), /* rel ptr to start of symbols */ 11 48 2 name unal bit(18), /* rel ptr to name of proc */ 11 49 2 brother unal bit(18), /* rel ptr to brother block */ 11 50 2 father unal bit(18), /* rel ptr to father block */ 11 51 2 son unal bit(18), /* rel ptr to son block */ 11 52 2 map unal, 11 53 3 first bit(18), /* rel ptr to first word of map */ 11 54 3 last bit(18), /* rel ptr to last word of map */ 11 55 2 entry_info unal bit(18), /* info about entry of quick block */ 11 56 2 header unal bit(18), /* rel ptr to symbol header */ 11 57 2 chain(4) unal bit(18), /* chain(i) is rel ptr to first symbol 11 58* on start list with length >= 2**i */ 11 59 2 token(0:5) unal bit(18), /* token(i) is rel ptr to first token 11 60* on list with length >= 2 ** i */ 11 61 2 owner unal bit(18); /* rel ptr to owner block */ 11 62 11 63 dcl 1 runtime_token aligned based, 11 64 2 next unal bit(18), /* rel ptr to next token */ 11 65 2 dcl unal bit(18), /* rel ptr to first dcl of this token */ 11 66 2 name, /* ACC */ 11 67 3 size unal unsigned fixed bin (9), /* number of chars in token */ 11 68 3 string unal char(n refer(runtime_token.size)); 11 69 11 70 dcl 1 encoded_value aligned based, 11 71 2 flag bit (2) unal, 11 72 2 code bit (4) unal, 11 73 2 n1 bit (6) unal, 11 74 2 n2 bit (6) unal, 11 75 2 n3 bit (18) unal; 11 76 11 77 /* END INCLUDE FILE ... runtime_symbol.incl.pl1 */ 150 151 152 /* Check information supplied by caller. Locate necessary runtime symbol nodes. */ 153 154 infop = infoptr; 155 rcode = 0; 156 157 do sp = stackframeptr () -> stack_frame.prev_sp repeat sp -> stack_frame.prev_sp 158 while (sp -> stack_frame_flags.support); 159 end; 160 cp = sp -> stack_frame.return_ptr; 161 162 call stu_$get_runtime_block (sp, header_ptr, block_ptr, bin (rel (cp), 18)); 163 if header_ptr = null 164 then do; 165 call com_err_ (0, myname, "Cannot get symbol table header."); 166 tranfai: 167 rcode = error_table_$translation_failed; 168 return; 169 end; 170 171 movdef = infop -> cds_args.defs_in_link; /* copy bit */ 172 oname = infop -> cds_args.seg_name; 173 174 if infop -> cds_args.have_text 175 then do; 176 tptr = infop -> cds_args.sections (1).p; 177 tlen = infop -> cds_args.sections (1).len; 178 tnode = find_runtime_symbol_node ("text", infop -> cds_args.sections (1).struct_name); 179 end; 180 else tnode = null; 181 182 if infop -> cds_args.have_static & infop -> cds_args.separate_static 183 then do; 184 sptr = infop -> cds_args.sections (2).p; 185 slen = infop -> cds_args.sections (2).len; 186 snode = find_runtime_symbol_node ("static", infop -> cds_args.sections (2).struct_name); 187 end; 188 else snode = null; 189 190 if infop -> cds_args.have_static & ^infop -> cds_args.separate_static 191 then do; 192 lptr = infop -> cds_args.sections (2).p; 193 llen = infop -> cds_args.sections (2).len; 194 lnode = find_runtime_symbol_node ("linkage", infop -> cds_args.sections (2).struct_name); 195 end; 196 else lnode = null; 197 198 /* Check legitimacy of all star names */ 199 200 do i = 1 to infop -> cds_args.num_exclude_names; 201 call check_star_name_$entry (infop -> cds_args.exclude_array_ptr -> exclude_names (i), code); 202 if code < 0 | 2 < code 203 then do; 204 call com_err_ (code, myname, "^a", infop -> cds_args.exclude_array_ptr -> exclude_names (i)); 205 go to tranfai; 206 end; 207 end; 208 209 /* All parameter checks have been passed. Now actually generate the object segment. */ 210 211 scrps (*) = null; 212 aclip = null; 213 on cleanup call clupper; 214 215 clupper: 216 proc; 217 call release_temp_segments_ (myname, scrps, code); 218 if aclip ^= null 219 then call tssi_$clean_up_segment (aclip); 220 end clupper; 221 222 call get_temp_segments_ (myname, scrps, code); 223 if code ^= 0 224 then do; 225 call com_err_ (code, myname, "Getting temporary segments."); 226 hell: 227 call clupper; 228 goto tranfai; 229 end; 230 231 call tssi_$get_segment (get_wdir_ (), oname, sgp, aclip, code); 232 if sgp = null 233 then do; 234 call com_err_ (code, myname, "^a", oname); 235 goto hell; 236 end; 237 238 /* build definitions */ 239 240 rlocp = scrps (DEFR); /* defreloc */ 241 putp = scrps (DEF); /* definitions */ 242 dhp = putp; 243 next = 0; 244 putp -> definition.new = "1"b; 245 246 putp -> definition.ignore, putp -> definition.new = "1"b; 247 248 rp = ptr (rlocp, next); 249 rp -> definition.forward, rp -> definition.backward = rc_dp; 250 vrloc (1).l, vrloc (1).r = rc_a; 251 252 prevdef = putp; 253 next = next + 2; 254 255 /* allocate the zeroword */ 256 257 putp = ptr (putp, next); 258 259 putp -> bword = "0"b; 260 vrloc (0).r, vrloc (0).l = rc_a; 261 zeroword = next; 262 263 next = next + 1; 264 265 /* put out segname */ 266 267 putp = ptr (putp, next); 268 prevdef -> definition.forward = rel (putp); 269 putp -> segname_def.backward = bit (bin (zeroword, 18), 18); 270 putp -> segname_def.next = bit (zeroword, 18); 271 prevdef = putp; 272 defp = putp; 273 rp = ptr (rlocp, next); 274 rp -> segname_def.forward, rp -> segname_def.backward, rp -> segname_def.symbol, rp -> segname_def.defblock = 275 rc_dp; 276 rp -> segname_def.next = rc_dp; 277 addr (rp -> segname_def.flags) -> b18u = rc_a; 278 279 defp -> segname_def.new = "1"b; 280 defp -> segname_def.class = "011"b; 281 next = next + size (segname_def); 282 283 strptr = alloc_acc (rtrim (oname)); 284 defp -> definition.symbol = rel (strptr); 285 class3ptr = defp; 286 287 /* define symbol_table */ 288 289 defp = putp; 290 prevdef -> segname_def.defblock = rel (defp); 291 prevdef -> segname_def.forward = rel (defp); 292 defp -> definition.backward = rel (prevdef); 293 prevdef = defp; 294 defp -> definition.value = "000000000000000000"b; 295 defp -> definition.class = "010"b; /* symbol */ 296 defp -> definition.new = "1"b; 297 defp -> definition.segname = rel (class3ptr); 298 rp = ptr (rlocp, next); 299 next = next + size (definition); 300 defp -> definition.symbol = rel (alloc_acc ("symbol_table")); 301 rp -> definition.forward, rp -> definition.backward, rp -> definition.segname, rp -> definition.symbol = rc_dp; 302 rp -> definition.value = rc_s; 303 addr (rp -> definition.flags) -> b18u = rc_a; 304 305 /* put out text definitions */ 306 307 if tnode = null 308 then tlen, tsize = 0; 309 else do; 310 tsize = tlen + mod (tlen, 2); 311 call generate_definitions (tnode, tptr, rc_t, 0); 312 end; 313 314 /* put out link definitions */ 315 316 if lnode = null 317 then llen, lsize = 0; 318 else do; 319 lsize = llen + mod (llen, 2); 320 call generate_definitions (lnode, lptr, rc_lp18, 1); 321 end; 322 323 /* put out static definitions */ 324 325 if snode = null 326 then slen, ssize = 0; 327 else do; 328 ssize = slen + mod (slen, 2); 329 call generate_definitions (snode, sptr, rc_is18, 4); 330 end; 331 332 dsize = next + mod (next, 2); 333 prevdef -> definition.forward = bit (zeroword, 18); 334 335 generate_definitions: 336 proc (nptr, struc_ptr, gen_reloc, gen_class); 337 dcl nptr ptr; 338 dcl struc_ptr ptr; 339 dcl gen_reloc bit (18); 340 dcl gen_class fixed bin (3); 341 342 dcl v2 fixed bin (35); 343 dcl point ptr; 344 dcl mod_tst (0:7) fixed bin internal static options (constant) 345 init (1, 36, 4, 2, 1, 36, 4, 8); 346 347 348 do point = nptr repeat addrel (point, point -> runtime_symbol.brother); 349 code = 1; 350 do i = 1 to infop -> cds_args.num_exclude_names while (code ^= 0); 351 call match_star_name_ (addrel (point, point -> runtime_symbol.name) -> acc.accstr, 352 infop -> cds_args.exclude_array_ptr -> exclude_names (i), code); 353 end; 354 355 if code ^= 0 356 then do; 357 if point -> runtime_symbol.bits.simple 358 then stucode, v2 = 0; 359 else do; 360 v2 = stu_$decode_runtime_value (point -> runtime_symbol.offset, block_ptr, sp, null, 361 null, struc_ptr, stucode); 362 if stucode ^= 0 363 then do; 364 call com_err_ (0, myname, "stu_$decode_runtime_value complains ^d on ^a", 365 stucode, addrel (point, point -> runtime_symbol.name) -> acc.accstr); 366 go to hell; 367 end; 368 if mod (v2, mod_tst (fixed (point -> runtime_symbol.units))) ^= 0 369 then do; 370 call com_err_ (0, myname, 371 "A level 2 element, ^a, is not word aligned and cannot be turned into an entrypoint.", 372 addrel (point, point -> runtime_symbol.name) -> acc.accstr); 373 go to skip_def; 374 end; 375 end; 376 377 if gen_class = 1 378 then v2 = v2 + size (virgin_linkage_header); 379 380 putp = ptr (putp, next); 381 defp = putp; 382 defp -> definition.class = bit (bin (gen_class, 3), 3); 383 defp -> definition.segname = rel (class3ptr); 384 defp -> definition.value = bit (bin (v2, 18), 18); 385 defp -> definition.new = "1"b; 386 rp = ptr (rlocp, next); 387 rp -> definition.forward, rp -> definition.backward, rp -> definition.symbol = rc_dp; 388 addr (rp -> definition.flags) -> b18u = rc_a; 389 rp -> definition.value = gen_reloc; 390 391 next = next + size (definition); 392 defp -> definition.symbol = 393 rel (alloc_acc (addrel (point, point -> runtime_symbol.name) -> acc.accstr)); 394 prevdef -> definition.forward = rel (defp); 395 defp -> definition.backward = rel (prevdef); 396 prevdef = defp; 397 skip_def: 398 end; 399 400 if point -> runtime_symbol.brother = "0"b 401 then return; 402 end; 403 end generate_definitions; 404 405 /* acc generator, which admittedly does some useless work */ 406 407 alloc_acc: 408 proc (cstr) returns (ptr); 409 410 dcl cstr char (*); 411 412 putp = ptr (putp, next); /* update ptr */ 413 wordl = divide (length (cstr), 4, 17, 0) + 1; 414 do i = 1 to wordl; 415 vrloc (i - 1).r, vrloc (i - 1).l = rc_a; 416 end; 417 putp -> acc.acclen = length (cstr); 418 putp -> acc.accstr = cstr; 419 next = next + wordl; 420 opp = putp; 421 putp = ptr (putp, next); 422 return (opp); 423 end alloc_acc; 424 425 /* cons some junk together */ 426 427 ojnxt = 0; 428 putp = ptr (sgp, ojnxt); 429 430 if tsize > 0 431 then do; 432 copylen = tlen; 433 putp -> copy = tptr -> copy; 434 ojnxt = ojnxt + tsize; 435 end; 436 437 if movdef 438 then drel = 0; 439 else do; /* put defs in normal place */ 440 drel = ojnxt; 441 copylen = dsize; 442 putp = ptr (putp, ojnxt); 443 putp -> copy = scrps (DEF) -> copy; 444 ojnxt = ojnxt + dsize; 445 end; 446 447 /* Generate separate static */ 448 449 srel = ojnxt; 450 if ssize > 0 451 then do; 452 copylen = slen; 453 putp = ptr (putp, ojnxt); 454 putp -> copy = sptr -> copy; 455 ojnxt = ojnxt + ssize; 456 end; 457 458 rlocp = scrps (LNKR); 459 rp = rlocp; 460 next = 0; 461 462 putp = ptr (sgp, ojnxt); 463 lrel = bin (rel (putp), 18); 464 hp = putp; 465 unspec (putp -> virgin_linkage_header) = "0"b; 466 putp -> virgin_linkage_header.def_offset = bit (drel, 18); 467 putp -> virgin_linkage_header.link_begin = bit (bin (lsize + size (virgin_linkage_header), 18), 18); 468 putp -> virgin_linkage_header.linkage_section_lng = putp -> virgin_linkage_header.link_begin; 469 470 next = next + size (virgin_linkage_header); 471 putp = addrel (putp, size (virgin_linkage_header)); 472 473 if lsize > 0 474 then do; 475 copylen = llen; 476 putp -> copy = lptr -> copy; 477 next = next + lsize; 478 end; 479 ojnxt = ojnxt + next; 480 if movdef 481 then do; /* Throw defs into link-resident static */ 482 hp -> virgin_linkage_header.defs_in_link = "010000"b; 483 hp -> virgin_linkage_header.def_offset = bit (bin (next, 18), 18); 484 drel = ojnxt; 485 copylen = dsize; 486 putp = ptr (putp, ojnxt); 487 putp -> copy = scrps (DEF) -> copy; 488 hp -> virgin_linkage_header.linkage_section_lng = 489 bit (bin (bin (hp -> virgin_linkage_header.linkage_section_lng, 18) + dsize, 18), 18); 490 ojnxt = ojnxt + dsize; 491 next = next + dsize; 492 end; 493 lsize = lsize + size (virgin_linkage_header); 494 do i = 0 to next - 1; /* link relocs */ 495 rloc (i).r, rloc (i).l = rc_a; 496 end; 497 rp -> virgin_linkage_header.def_offset = rc_dp; 498 rp -> virgin_linkage_header.link_begin = rc_lp18; 499 500 /* Create symbol section */ 501 502 syrel = ojnxt; 503 putp = ptr (sgp, ojnxt); 504 rlocp = scrps (SYMR); 505 506 next = 0; 507 dtmc, now = clock (); 508 pv = ptr (codeptr (create_data_segment_), 0); 509 510 call hcs_$status_mins (pv, 0, bc, code); 511 if code = 0 512 then do; 513 oi.version_number = object_info_version_2; 514 call object_info_$brief (pv, bc, addr (oi), code); 515 if code = 0 516 then dtmc = oi.symbp -> std_symbol_header.object_created; 517 end; 518 519 hp = putp; 520 hp -> std_symbol_header.dcl_version = 1; 521 hp -> std_symbol_header.identifier = "symbol_t"; 522 hp -> std_symbol_header.gen_number = 1; 523 hp -> std_symbol_header.gen_created = dtmc; 524 hp -> std_symbol_header.object_created = now; 525 hp -> std_symbol_header.generator = "cds"; 526 next = size (std_symbol_header); 527 putp = addrel (hp, next); 528 call putstr ("create_data_segment_, Version II of " 529 || date_time_$format ("^dn, ^mn ^dm, ^9999yc", dtmc, "", ""), hp -> std_symbol_header.gen_version, 530 rlocp -> std_symbol_header.gen_version); 531 call putstr (rtrim (get_group_id_ ()), hp -> std_symbol_header.userid, rlocp -> std_symbol_header.userid); 532 533 putstr: 534 proc (str, struc, rstruc); 535 536 dcl 1 struc unaligned, 537 2 (of, sz) bit (18); 538 dcl 1 rstruc unaligned, 539 2 (rof, rsz) bit (18); 540 dcl str char (*); 541 542 sz = bit (bin (length (str), 18), 18); 543 wordl = divide (length (str) + 3, 4, 17, 0); 544 rof, rsz = rc_a; /* I take no responsibility for this lie */ 545 copylen = length (str); 546 putp = addrel (hp, next); 547 of = bit (bin (bin (rel (putp), 18) - bin (rel (hp), 18), 18), 18); 548 putp -> strcopy = str; 549 next = next + wordl; 550 putp = addrel (hp, next); 551 end putstr; 552 553 /* copy other guy's source map */ 554 555 cp = ptr (cp, 0); 556 call hcs_$status_mins (cp, 0, bc, code); 557 if code = 0 558 then do; 559 oi.version_number = object_info_version_2; 560 call object_info_$brief (cp, bc, addr (oi), code); 561 end; 562 563 osymp = oi.symbp; 564 osmp = addrel (osymp, osymp -> std_symbol_header.source_map); 565 next = next + mod (next, 2); /* source map gotta be even */ 566 hp -> std_symbol_header.source_map = bit (bin (next, 18), 18); 567 putp = addrel (hp, next); 568 smp = putp; 569 smp -> source_map.version = osmp -> source_map.version; 570 smp -> source_map.number = osmp -> source_map.number; 571 smrcp = ptr (rlocp, next); 572 n = smp -> source_map.number; 573 next = size (smp -> source_map) + next; 574 putp = addrel (hp, next); 575 do i = 1 to smp -> source_map.number; 576 strc1p = addrel (osymp, osmp -> source_map.offset (i)); 577 strcopy1l = bin (osmp -> source_map.size (i), 18); 578 call putstr (strcopy1, smp -> source_map.pathname (i), smrcp -> source_map.pathname (i)); 579 smp -> source_map.dtm (i) = osmp -> source_map.dtm (i); 580 smp -> source_map.uid (i) = osmp -> source_map.uid (i); 581 end; 582 583 /* generate symbol section relocation */ 584 585 rp = scrps (SYMR); 586 rp -> std_symbol_header.source_map, rp -> std_symbol_header.area_pointer, rp -> std_symbol_header.rel_text, 587 rp -> std_symbol_header.rel_def, rp -> std_symbol_header.rel_symbol, rp -> std_symbol_header.rel_link = 588 rc_s; 589 590 hp -> std_symbol_header.maxi_truncate, hp -> std_symbol_header.mini_truncate = bit (bin (next, 18), 18); 591 hp -> std_symbol_header.text_boundary, hp -> std_symbol_header.stat_boundary = bit (bin (2, 18), 18); 592 putp = addrel (hp, next); 593 if ^movdef 594 then do; 595 call relbits (hp -> std_symbol_header.rel_text, tsize, scrps (TXTR)); 596 call relbits (hp -> std_symbol_header.rel_def, dsize, scrps (DEFR)); 597 call relbits (hp -> std_symbol_header.rel_link, lsize, scrps (LNKR)); 598 call relbits (hp -> std_symbol_header.rel_symbol, (next), scrps (SYMR)); 599 end; 600 sysize = next; 601 ojnxt = ojnxt + next; 602 603 /* generate the object_map */ 604 605 putp = ptr (sgp, ojnxt); 606 unspec (putp -> object_map) = "0"b; 607 putp -> object_map.decl_vers = object_map_version_2; 608 putp -> object_map.identifier = "obj_map"; 609 putp -> object_map.text_length = bit (bin (tsize, 18), 18); 610 putp -> object_map.definition_offset = bit (bin (drel, 18), 18); 611 putp -> object_map.definition_length = bit (bin (dsize, 18), 18); 612 putp -> object_map.linkage_offset = bit (bin (lrel, 18), 18); 613 if movdef 614 then putp -> object_map.linkage_length = bit (bin (lsize + dsize, 18), 18); 615 else putp -> object_map.linkage_length = bit (bin (lsize, 18), 18); 616 if ssize > 0 617 then do; 618 putp -> object_map.static_offset = bit (bin (srel, 18), 18); 619 putp -> object_map.static_length = bit (bin (ssize, 18), 18); 620 putp -> object_map.separate_static = "1"b; 621 end; 622 else do; 623 putp -> object_map.static_offset = bit (bin (lrel + size (virgin_linkage_header), 18), 18); 624 putp -> object_map.static_length = bit (bin (lsize - size (virgin_linkage_header), 18), 18); 625 end; 626 putp -> object_map.symbol_offset = bit (bin (syrel, 18), 18); 627 putp -> object_map.symbol_length = bit (bin (sysize, 18), 18); 628 putp -> object_map.break_map_offset, putp -> object_map.break_map_length = "0"b; 629 putp -> object_map.standard = "1"b; 630 putp -> object_map.relocatable = ^movdef; 631 putp = addrel (putp, size (object_map)); 632 next = bin (rel (putp), 18); 633 putp -> map_ptr = bit (bin (next - size (object_map), 18), 18); 634 next = next + 1; 635 call tssi_$finish_segment (sgp, 36 * next, "1"b, aclip, code); 636 aclip = null; 637 if code ^= 0 638 then call com_err_ (code, myname, "Finishing up segment."); 639 640 call clupper; 641 642 return; 643 644 find_runtime_symbol_node: 645 procedure (section, structure_name) returns (ptr); 646 647 dcl section char (*); /* (Input) */ 648 dcl structure_name char (*) aligned; /* (Input) */ 649 650 dcl node ptr; 651 652 dcl stufail (-5:-1) char (32) internal static options (constant) 653 initial ("Symbol reference is ambiguous", "No declaration found", 654 "Name too long", "More than 64 structure levels", "Block pointer is null"); 655 656 node = stu_$find_runtime_symbol (block_ptr, rtrim (structure_name), null, stucode); 657 if stucode < 0 658 then do; 659 call com_err_ (0, myname, "^a for ^a section structure ^a", stufail (stucode), section, 660 structure_name); 661 goto tranfai; 662 end; 663 664 if node -> runtime_symbol.son = ""b 665 then do; 666 call com_err_ (0, myname, "Symbol ^a for ^a section is not a structure.", structure_name, section); 667 goto tranfai; 668 end; 669 670 if node -> runtime_symbol.ndims ^= ""b 671 then do; 672 call com_err_ (0, myname, "Symbol ^a for ^a section is an array.", structure_name, section); 673 goto tranfai; 674 end; 675 676 return (addrel (node, node -> runtime_symbol.son)); 677 end find_runtime_symbol_node; 678 679 /* The great relocation hacker */ 680 681 relbits: 682 proc (relans, words, rptr); 683 dcl rhp ptr; 684 dcl relans bit (18) unal, 685 words fixed bin (18), 686 rptr ptr; 687 dcl bitstr bit (1000000) based (putp) aligned; 688 dcl bitpos fixed bin init (1); 689 690 putp -> relinfo.decl_version = 2; 691 rhp = putp; 692 next = next + size (relinfo); 693 putp = addrel (hp, next); 694 695 do i = 0 to words - 1; 696 call irloc (rptr -> rloc (i).l); 697 call irloc (rptr -> rloc (i).r); 698 end; 699 700 irloc: 701 proc (rfld); 702 dcl rfld bit (18) unaligned; 703 if rfld = "0"b 704 then do; 705 substr (bitstr, bitpos, 1) = "0"b; 706 bitpos = bitpos + 1; 707 end; 708 else do; 709 substr (bitstr, bitpos, 5) = substr (rfld, 14, 5); 710 bitpos = bitpos + 5; 711 end; 712 end irloc; 713 714 rhp -> relinfo.n_bits = bitpos - 1; 715 bitpos = bitpos + mod (bitpos, 36); 716 bitpos = divide (bitpos, 36, 18, 0); 717 next = next + bitpos; 718 relans = bit (bin (bin (rel (rhp), 18) - bin (rel (hp), 18), 18), 18); 719 putp = addrel (putp, bitpos); 720 end relbits; 721 722 end create_data_segment_; SOURCE FILES USED IN THIS COMPILATION. LINE NUMBER DATE MODIFIED NAME PATHNAME 0 05/17/90 1511.5 create_data_segment_.pl1 >spec>install>1009>create_data_segment_.pl1 140 1 04/01/76 2309.5 cds_args.incl.pl1 >ldd>include>cds_args.incl.pl1 141 2 11/07/86 1650.3 stack_frame.incl.pl1 >ldd>include>stack_frame.incl.pl1 142 3 11/24/86 1326.9 definition.incl.pl1 >ldd>include>definition.incl.pl1 143 4 10/30/80 1748.7 segname_def.incl.pl1 >ldd>include>segname_def.incl.pl1 144 5 11/26/79 1420.6 source_map.incl.pl1 >ldd>include>source_map.incl.pl1 145 6 10/30/80 1748.7 relbts.incl.pl1 >ldd>include>relbts.incl.pl1 146 7 08/05/77 1122.5 object_info.incl.pl1 >ldd>include>object_info.incl.pl1 147 8 08/05/77 1122.5 object_map.incl.pl1 >ldd>include>object_map.incl.pl1 148 9 07/27/83 1010.0 linkdcl.incl.pl1 >ldd>include>linkdcl.incl.pl1 149 10 05/06/74 1851.6 std_symbol_header.incl.pl1 >ldd>include>std_symbol_header.incl.pl1 150 11 11/26/79 1420.6 runtime_symbol.incl.pl1 >ldd>include>runtime_symbol.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. DEF constant fixed bin(17,0) initial dcl 51 ref 241 443 487 DEFR constant fixed bin(17,0) initial dcl 51 ref 240 596 LNKR constant fixed bin(17,0) initial dcl 51 ref 458 597 SYMR constant fixed bin(17,0) initial dcl 51 ref 504 585 598 TXTR constant fixed bin(17,0) initial dcl 51 ref 595 acc based structure level 1 dcl 73 acc1 based structure level 2 packed packed unaligned dcl 73 acclen based fixed bin(8,0) level 3 packed packed unaligned dcl 73 set ref 351 351 364 364 370 370 392 392 417* 418 accstr 0(09) based char level 3 packed packed unaligned dcl 73 set ref 351* 364* 370* 392* 418* aclip 000260 automatic pointer dcl 96 set ref 212* 218 218* 231* 635* 636* addr builtin function dcl 132 ref 277 303 388 514 514 560 560 addrel builtin function dcl 132 ref 351 364 370 392 402 471 527 546 550 564 567 574 576 592 631 676 693 719 area_pointer 16(18) based bit(18) level 2 packed packed unaligned dcl 10-1 set ref 586* b18u based bit(18) packed unaligned dcl 69 set ref 277* 303* 388* backward 0(18) based bit(18) level 2 in structure "segname_def" packed packed unaligned dcl 4-3 in procedure "create_data_segment_" set ref 269* 274* backward 0(18) based bit(18) level 2 in structure "definition" packed packed unaligned dcl 3-12 in procedure "create_data_segment_" set ref 249* 292* 301* 387* 395* bc 000273 automatic fixed bin(24,0) dcl 104 set ref 510* 514* 556* 560* bin builtin function dcl 132 ref 162 162 269 382 384 463 467 483 488 488 542 547 547 547 566 577 590 591 609 610 611 612 613 615 618 619 623 624 626 627 632 633 718 718 718 bit builtin function dcl 132 ref 269 270 333 382 384 466 467 483 488 542 547 566 590 591 609 610 611 612 613 615 618 619 623 624 626 627 633 718 bitpos 000410 automatic fixed bin(17,0) initial dcl 688 set ref 688* 705 706* 706 709 710* 710 714 715* 715 715 716* 716 717 719 bits 0(24) based structure level 2 packed packed unaligned dcl 11-3 bitstr based bit(1000000) dcl 687 set ref 705* 709* block_ptr 000322 automatic pointer dcl 119 set ref 162* 360* 656* break_map_length 10(18) based bit(18) level 2 packed packed unaligned dcl 8-10 set ref 628* break_map_offset 10 based bit(18) level 2 packed packed unaligned dcl 8-10 set ref 628* brother 1(18) based bit(18) level 2 packed packed unaligned dcl 11-3 ref 400 402 bword based bit(36) packed unaligned dcl 111 set ref 259* cds_args based structure level 1 dcl 1-3 check_star_name_$entry 000024 constant entry external dcl 85 ref 201 class 1(33) based bit(3) level 2 in structure "segname_def" packed packed unaligned dcl 4-3 in procedure "create_data_segment_" set ref 280* class 1(33) based bit(3) level 2 in structure "definition" packed packed unaligned dcl 3-12 in procedure "create_data_segment_" set ref 295* 382* class3ptr 000122 automatic pointer dcl 49 set ref 285* 297 383 cleanup 000250 stack reference condition dcl 94 ref 213 clock builtin function dcl 132 ref 507 code 000334 automatic fixed bin(35,0) dcl 123 set ref 201* 202 202 204* 217* 222* 223 225* 231* 234* 349* 350 351* 355 510* 511 514* 515 556* 557 560* 635* 637 637* codeptr builtin function dcl 132 ref 508 com_err_ 000044 constant entry external dcl 126 ref 165 204 225 234 364 370 637 659 666 672 copy based bit(36) array dcl 100 set ref 433* 433 443* 443 454* 454 476* 476 487* 487 copylen 000270 automatic fixed bin(19,0) dcl 101 set ref 432* 433 441* 443 452* 454 475* 476 485* 487 545* 548 cp 000332 automatic pointer dcl 122 set ref 160* 162 162 555* 555 556* 560* cstr parameter char packed unaligned dcl 410 ref 407 413 417 418 date_time_$format 000042 constant entry external dcl 124 ref 528 dcl_version based fixed bin(17,0) level 2 dcl 10-1 set ref 520* decl_vers based fixed bin(17,0) level 2 dcl 8-10 set ref 607* decl_version based fixed bin(17,0) level 2 dcl 60 set ref 690* def_offset 1 based bit(18) level 2 packed packed unaligned dcl 9-52 set ref 466* 483* 497* defblock 2(18) based bit(18) level 2 packed packed unaligned dcl 4-3 set ref 274* 290* definition based structure level 1 dcl 3-12 set ref 299 391 definition_length 4(18) based bit(18) level 2 packed packed unaligned dcl 8-10 set ref 611* definition_offset 4 based bit(18) level 2 packed packed unaligned dcl 8-10 set ref 610* defp 000120 automatic pointer dcl 49 set ref 272* 279 280 284 285 289* 290 291 292 293 294 295 296 297 300 381* 382 383 384 385 392 394 395 396 defs_in_link 0(30) based bit(6) level 2 in structure "virgin_linkage_header" packed packed unaligned dcl 9-52 in procedure "create_data_segment_" set ref 482* defs_in_link 44 based bit(1) level 3 in structure "cds_args" packed packed unaligned dcl 1-3 in procedure "create_data_segment_" ref 171 dhp 000262 automatic pointer dcl 98 set ref 242* divide builtin function dcl 132 ref 413 543 716 drel 000344 automatic fixed bin(18,0) dcl 137 set ref 437* 440* 466 484* 610 dsize 000340 automatic fixed bin(18,0) dcl 135 set ref 332* 441 444 485 488 490 491 596* 611 613 dtm 4 based fixed bin(71,0) array level 3 dcl 5-3 set ref 579* 579 dtmc 000154 automatic fixed bin(71,0) dcl 87 set ref 507* 515* 523 528* error_table_$translation_failed 000010 external static fixed bin(35,0) dcl 78 ref 166 exclude_array_ptr 42 based pointer level 2 dcl 1-3 ref 201 204 351 exclude_names based char(32) array packed unaligned dcl 1-18 set ref 201* 204* 351* fixed builtin function dcl 132 ref 368 flags 1(18) based structure level 2 in structure "segname_def" packed packed unaligned dcl 4-3 in procedure "create_data_segment_" set ref 277 flags 1(18) based structure level 2 in structure "definition" packed packed unaligned dcl 3-12 in procedure "create_data_segment_" set ref 303 388 format 12 based structure level 2 dcl 8-10 forward based bit(18) level 2 in structure "segname_def" packed packed unaligned dcl 4-3 in procedure "create_data_segment_" set ref 274* 291* forward based bit(18) level 2 in structure "definition" packed packed unaligned dcl 3-12 in procedure "create_data_segment_" set ref 249* 268* 301* 333* 387* 394* gen_class parameter fixed bin(3,0) dcl 340 ref 335 377 382 gen_created 4 based fixed bin(71,0) level 2 dcl 10-1 set ref 523* gen_number 3 based fixed bin(17,0) level 2 dcl 10-1 set ref 522* gen_reloc parameter bit(18) packed unaligned dcl 339 ref 335 389 gen_version 12 based structure level 2 packed packed unaligned dcl 10-1 set ref 528* 528* generator 10 based char(8) level 2 dcl 10-1 set ref 525* get_group_id_ 000036 constant entry external dcl 105 ref 531 531 get_temp_segments_ 000014 constant entry external dcl 81 ref 222 get_wdir_ 000020 constant entry external dcl 83 ref 231 231 have_static 44(03) based bit(1) level 3 packed packed unaligned dcl 1-3 ref 182 190 have_text 44(02) based bit(1) level 3 packed packed unaligned dcl 1-3 ref 174 hcs_$status_mins 000032 constant entry external dcl 92 ref 510 556 header_ptr 000320 automatic pointer dcl 119 set ref 162* 163 hp 000110 automatic pointer dcl 49 set ref 464* 482 483 488 488 519* 520 521 522 523 524 525 527 528 531 546 547 550 566 567 574 590 590 591 591 592 595 596 597 598 693 718 i 000246 automatic fixed bin(17,0) dcl 91 set ref 200* 201 204* 350* 351* 414* 415 415* 494* 495 495* 575* 576 577 578 578 579 579 580 580* 695* 696 697* identifier 1 based char(8) level 2 in structure "object_map" dcl 8-10 in procedure "create_data_segment_" set ref 608* identifier 1 based char(8) level 2 in structure "std_symbol_header" dcl 10-1 in procedure "create_data_segment_" set ref 521* ignore 1(19) based bit(1) level 3 packed packed unaligned dcl 3-12 set ref 246* infop 000100 automatic pointer dcl 45 set ref 154* 171 172 174 176 177 178 182 182 184 185 186 190 190 192 193 194 200 201 204 350 351 infoptr parameter pointer dcl 45 ref 40 154 l based bit(18) array level 3 in structure "vrloc" packed packed unaligned dcl 68 in procedure "create_data_segment_" set ref 250* 260* 415* l based bit(18) array level 3 in structure "rloc" packed packed unaligned dcl 64 in procedure "create_data_segment_" set ref 495* 696* len 2 based fixed bin(18,0) array level 3 dcl 1-3 ref 177 185 193 length builtin function dcl 132 ref 413 417 542 543 545 link_begin 6 based bit(18) level 2 packed packed unaligned dcl 9-52 set ref 467* 468 498* linkage_length 5(18) based bit(18) level 2 packed packed unaligned dcl 8-10 set ref 613* 615* linkage_offset 5 based bit(18) level 2 packed packed unaligned dcl 8-10 set ref 612* linkage_section_lng 6(18) based bit(18) level 2 packed packed unaligned dcl 9-52 set ref 468* 488* 488 llen 000105 automatic fixed bin(19,0) dcl 47 set ref 193* 316* 319 319 475 lnode 000326 automatic pointer dcl 121 set ref 194* 196* 316 320* lptr 000150 automatic pointer dcl 77 set ref 192* 320* 476 lrel 000343 automatic fixed bin(18,0) dcl 137 set ref 463* 612 623 lsize 000335 automatic fixed bin(18,0) dcl 135 set ref 316* 319* 467 473 477 493* 493 597* 613 615 624 map 2 based structure array level 2 dcl 5-3 map_ptr based bit(18) dcl 8-38 set ref 633* match_star_name_ 000022 constant entry external dcl 84 ref 351 maxi_truncate 23 based bit(18) level 2 packed packed unaligned dcl 10-1 set ref 590* mini_truncate 22(18) based bit(18) level 2 packed packed unaligned dcl 10-1 set ref 590* mod builtin function dcl 132 ref 310 319 328 332 368 565 715 mod_tst 000050 constant fixed bin(17,0) initial array dcl 344 ref 368 movdef 000106 automatic bit(1) dcl 48 set ref 171* 437 480 593 613 630 myname 000063 constant char(32) initial packed unaligned dcl 44 set ref 165* 204* 217* 222* 225* 234* 364* 370* 637* 659* 666* 672* n 000272 automatic fixed bin(17,0) dcl 103 set ref 572* 573 n_bits 1 based fixed bin(17,0) level 2 dcl 60 set ref 714* name 1 based bit(18) level 2 packed packed unaligned dcl 11-3 ref 351 364 370 392 ndims 0(18) based bit(6) level 2 packed packed unaligned dcl 11-3 ref 670 new 1(18) based bit(1) level 3 in structure "definition" packed packed unaligned dcl 3-12 in procedure "create_data_segment_" set ref 244* 246* 296* 385* new 1(18) based bit(1) level 3 in structure "segname_def" packed packed unaligned dcl 4-3 in procedure "create_data_segment_" set ref 279* next 1 based bit(18) level 2 in structure "segname_def" packed packed unaligned dcl 4-3 in procedure "create_data_segment_" set ref 270* 276* next 000300 automatic fixed bin(18,0) dcl 108 in procedure "create_data_segment_" set ref 243* 248 250 250 253* 253 257 260 260 261 263* 263 267 273 281* 281 298 299* 299 332 332 380 386 391* 391 412 415 415 419* 419 421 460* 470* 470 477* 477 479 483 491* 491 494 506* 526* 527 546 549* 549 550 565* 565 565 566 567 571 573* 573 574 590 592 598 600 601 632* 633 634* 634 635 692* 692 693 717* 717 node 000376 automatic pointer dcl 650 set ref 656* 664 670 676 676 now 000152 automatic fixed bin(71,0) dcl 87 set ref 507* 524 nptr parameter pointer dcl 337 ref 335 348 null builtin function dcl 132 ref 163 180 188 196 211 212 218 232 307 316 325 360 360 360 360 636 656 656 num_exclude_names 40 based fixed bin(17,0) level 2 dcl 1-3 ref 200 350 number 1 based fixed bin(17,0) level 2 dcl 5-3 set ref 570* 570 572 575 object_created 6 based fixed bin(71,0) level 2 dcl 10-1 set ref 515 524* object_info based structure level 1 dcl 7-6 object_info_$brief 000030 constant entry external dcl 88 ref 514 560 object_info_version_2 constant fixed bin(17,0) initial dcl 7-60 ref 513 559 object_map based structure level 1 dcl 8-10 set ref 606* 631 633 object_map_version_2 constant fixed bin(17,0) initial dcl 8-40 ref 607 of parameter bit(18) level 2 packed packed unaligned dcl 536 set ref 547* offset 2 based bit(18) array level 4 in structure "source_map" packed packed unaligned dcl 5-3 in procedure "create_data_segment_" set ref 576 offset 5 based fixed bin(35,0) level 2 in structure "runtime_symbol" dcl 11-3 in procedure "create_data_segment_" set ref 360* oi 000156 automatic structure level 1 dcl 89 set ref 514 514 560 560 ojnxt 000301 automatic fixed bin(18,0) dcl 109 set ref 427* 428 434* 434 440 442 444* 444 449 453 455* 455 462 479* 479 484 486 490* 490 502 503 601* 601 605 oname 000307 automatic char(32) packed unaligned dcl 116 set ref 172* 231* 234* 283 283 opp 000264 automatic pointer dcl 99 set ref 420* 422 osmp 000114 automatic pointer dcl 49 set ref 564* 569 570 576 577 579 580 osymp 000116 automatic pointer dcl 49 set ref 563* 564 564 576 p based pointer array level 3 dcl 1-3 ref 176 184 192 pathname 2 based structure array level 3 packed packed unaligned dcl 5-3 set ref 578* 578* point 000364 automatic pointer dcl 343 set ref 348* 351 351 357 360 364 364 368 370 370 392 392 400* 402 402* prev_sp 20 based pointer level 2 dcl 2-36 ref 157 159 prevdef 000274 automatic pointer dcl 106 set ref 252* 268 271* 290 291 292 293* 333 394 395 396* ptr builtin function dcl 132 ref 248 250 250 257 260 260 267 273 298 380 386 412 415 415 421 428 442 453 462 486 503 508 555 571 605 putp 000140 automatic pointer dcl 72 set ref 241* 242 244 246 246 252 257* 257 259 267* 267 268 269 270 271 272 289 380* 380 381 412* 412 417 418 420 421* 421 428* 433 442* 442 443 453* 453 454 462* 463 464 465 466 467 468 468 471* 471 476 486* 486 487 503* 519 527* 546* 547 548 550* 567* 568 574* 592* 605* 606 607 608 609 610 611 612 613 615 618 619 620 623 624 626 627 628 628 629 630 631* 631 632 633 690 691 693* 705 709 719* 719 pv 000276 automatic pointer dcl 107 set ref 508* 510* 514* r 0(18) based bit(18) array level 3 in structure "vrloc" packed packed unaligned dcl 68 in procedure "create_data_segment_" set ref 250* 260* 415* r 0(18) based bit(18) array level 3 in structure "rloc" packed packed unaligned dcl 64 in procedure "create_data_segment_" set ref 495* 697* rc_a constant bit(18) initial packed unaligned dcl 6-6 ref 250 260 277 303 388 415 495 544 rc_dp constant bit(18) initial packed unaligned dcl 6-6 ref 249 274 276 301 387 497 rc_is18 000060 constant bit(18) initial packed unaligned dcl 6-6 set ref 329* rc_lp18 000061 constant bit(18) initial packed unaligned dcl 6-6 set ref 320* 498 rc_s constant bit(18) initial packed unaligned dcl 6-6 ref 302 586 rc_t 000062 constant bit(18) initial packed unaligned dcl 6-6 set ref 311* rcode parameter fixed bin(35,0) dcl 43 set ref 40 155* 166* rel builtin function dcl 132 ref 162 162 268 284 290 291 292 297 300 383 392 394 395 463 547 547 632 718 718 rel_def 21 based bit(18) level 2 packed packed unaligned dcl 10-1 set ref 586* 596* rel_link 21(18) based bit(18) level 2 packed packed unaligned dcl 10-1 set ref 586* 597* rel_symbol 22 based bit(18) level 2 packed packed unaligned dcl 10-1 set ref 586* 598* rel_text 20(18) based bit(18) level 2 packed packed unaligned dcl 10-1 set ref 586* 595* relans parameter bit(18) packed unaligned dcl 684 set ref 681 718* release_temp_segments_ 000016 constant entry external dcl 82 ref 217 relinfo based structure level 1 dcl 60 set ref 692 relocatable 12(01) based bit(1) level 3 packed packed unaligned dcl 8-10 set ref 630* return_ptr 24 based pointer level 2 dcl 2-36 ref 160 rfld parameter bit(18) packed unaligned dcl 702 ref 700 703 709 rhp 000406 automatic pointer dcl 683 set ref 691* 714 718 rloc based structure level 1 dcl 64 rlocp 000142 automatic pointer dcl 72 set ref 240* 248 250 250 260 260 273 298 386 415 415 458* 459 495 495 504* 528 531 571 rof parameter bit(18) level 2 packed packed unaligned dcl 538 set ref 544* rp 000136 automatic pointer dcl 69 set ref 248* 249 249 273* 274 274 274 274 276 277 298* 301 301 301 301 302 303 386* 387 387 387 388 389 459* 497 498 585* 586 586 586 586 586 586 rptr parameter pointer dcl 684 ref 681 696 697 rstruc parameter structure level 1 packed packed unaligned dcl 538 set ref 533 rsz 0(18) parameter bit(18) level 2 packed packed unaligned dcl 538 set ref 544* rtrim builtin function dcl 132 ref 283 283 531 531 656 656 runtime_symbol based structure level 1 dcl 11-3 scrps 000124 automatic pointer array dcl 59 set ref 211* 217* 222* 240 241 443 458 487 504 585 595* 596* 597* 598* section parameter char packed unaligned dcl 647 set ref 644 659* 666* 672* sections based structure array level 2 dcl 1-3 seg_name 30 based char(32) level 2 dcl 1-3 ref 172 segname 2(18) based bit(18) level 2 packed packed unaligned dcl 3-12 set ref 297* 301* 383* segname_def based structure level 1 dcl 4-3 set ref 281 separate_static 12(04) based bit(1) level 3 in structure "object_map" packed packed unaligned dcl 8-10 in procedure "create_data_segment_" set ref 620* separate_static 44(01) based bit(1) level 3 in structure "cds_args" packed packed unaligned dcl 1-3 in procedure "create_data_segment_" ref 182 190 sgp 000256 automatic pointer dcl 96 set ref 231* 232 428 462 503 605 635* simple 0(26) based bit(1) level 3 packed packed unaligned dcl 11-3 ref 357 size 2(18) based bit(18) array level 4 in structure "source_map" packed packed unaligned dcl 5-3 in procedure "create_data_segment_" set ref 577 size builtin function dcl 132 in procedure "create_data_segment_" ref 281 299 377 391 467 470 471 493 526 573 623 624 631 633 692 slen 000103 automatic fixed bin(19,0) dcl 47 set ref 185* 325* 328 328 452 smp 000112 automatic pointer dcl 49 set ref 568* 569 570 572 573 575 578 579 580 smrcp 000266 automatic pointer dcl 99 set ref 571* 578 snode 000330 automatic pointer dcl 121 set ref 186* 188* 325 329* son 2(18) based bit(18) level 2 packed packed unaligned dcl 11-3 ref 664 676 source_map 16 based bit(18) level 2 in structure "std_symbol_header" packed packed unaligned dcl 10-1 in procedure "create_data_segment_" set ref 564 566* 586* source_map based structure level 1 dcl 5-3 in procedure "create_data_segment_" set ref 573 sp 000346 automatic pointer dcl 2-31 set ref 157* 157* 159 160 162* 360* sptr 000146 automatic pointer dcl 77 set ref 184* 329* 454 srel 000342 automatic fixed bin(18,0) dcl 137 set ref 449* 618 ssize 000341 automatic fixed bin(18,0) dcl 135 set ref 325* 328* 450 455 616 619 stack_frame based structure level 1 dcl 2-36 stack_frame_flags based structure level 1 dcl 2-64 stackframeptr builtin function dcl 132 ref 157 standard 12(03) based bit(1) level 3 packed packed unaligned dcl 8-10 set ref 629* stat_boundary 15(18) based bit(18) level 2 packed packed unaligned dcl 10-1 set ref 591* static_length 6(18) based bit(18) level 2 packed packed unaligned dcl 8-10 set ref 619* 624* static_offset 6 based bit(18) level 2 packed packed unaligned dcl 8-10 set ref 618* 623* std_symbol_header based structure level 1 dcl 10-1 set ref 526 str parameter char packed unaligned dcl 540 ref 533 542 543 545 548 strc1p 000304 automatic pointer dcl 114 set ref 576* 578 strcopy based char packed unaligned dcl 112 set ref 548* strcopy1 based char packed unaligned dcl 113 set ref 578* strcopy1l 000306 automatic fixed bin(17,0) dcl 115 set ref 577* 578 578 strptr 000244 automatic pointer dcl 90 set ref 283* 284 struc parameter structure level 1 packed packed unaligned dcl 536 set ref 533 struc_ptr parameter pointer dcl 338 set ref 335 360* struct_name 3 based char(32) array level 3 dcl 1-3 set ref 178* 186* 194* structure_name parameter char dcl 648 set ref 644 656 656 659* 666* 672* stu_$decode_runtime_value 000050 constant entry external dcl 129 ref 360 stu_$find_runtime_symbol 000046 constant entry external dcl 127 ref 656 stu_$get_runtime_block 000040 constant entry external dcl 118 ref 162 stucode 000102 automatic fixed bin(17,0) dcl 46 set ref 357* 360* 362 364* 656* 657 659 stufail 000000 constant char(32) initial array packed unaligned dcl 652 set ref 659* substr builtin function dcl 132 set ref 705* 709* 709 support 20(28) based bit(1) level 2 packed packed unaligned dcl 2-64 ref 157 switches 44 based structure level 2 dcl 1-3 symbol 2 based bit(18) level 2 in structure "segname_def" packed packed unaligned dcl 4-3 in procedure "create_data_segment_" set ref 274* symbol 2 based bit(18) level 2 in structure "definition" packed packed unaligned dcl 3-12 in procedure "create_data_segment_" set ref 284* 300* 301* 387* 392* symbol_length 7(18) based bit(18) level 2 packed packed unaligned dcl 8-10 set ref 627* symbol_offset 7 based bit(18) level 2 packed packed unaligned dcl 8-10 set ref 626* symbp 12 000156 automatic pointer level 2 dcl 89 set ref 515 563 syrel 000345 automatic fixed bin(18,0) dcl 137 set ref 502* 626 sysize 000336 automatic fixed bin(18,0) dcl 135 set ref 600* 627 sz 0(18) parameter bit(18) level 2 packed packed unaligned dcl 536 set ref 542* text_boundary 15 based bit(18) level 2 packed packed unaligned dcl 10-1 set ref 591* text_length 3(18) based bit(18) level 2 packed packed unaligned dcl 8-10 set ref 609* tlen 000104 automatic fixed bin(19,0) dcl 47 set ref 177* 307* 310 310 432 tnode 000324 automatic pointer dcl 121 set ref 178* 180* 307 311* tptr 000144 automatic pointer dcl 77 set ref 176* 311* 433 tsize 000337 automatic fixed bin(18,0) dcl 135 set ref 307* 310* 430 434 595* 609 tssi_$clean_up_segment 000034 constant entry external dcl 93 ref 218 tssi_$finish_segment 000026 constant entry external dcl 86 ref 635 tssi_$get_segment 000012 constant entry external dcl 80 ref 231 uid 3 based bit(36) array level 3 dcl 5-3 set ref 580* 580 units 0(04) based bit(2) level 2 packed packed unaligned dcl 11-3 ref 368 unspec builtin function dcl 132 set ref 465* 606* userid 13 based structure level 2 packed packed unaligned dcl 10-1 set ref 531* 531* v2 000362 automatic fixed bin(35,0) dcl 342 set ref 357* 360* 368 377* 377 384 value 1 based bit(18) level 2 packed packed unaligned dcl 3-12 set ref 294* 302* 384* 389* version based fixed bin(17,0) level 2 dcl 5-3 set ref 569* 569 version_number 000156 automatic fixed bin(17,0) level 2 dcl 89 set ref 513* 559* virgin_linkage_header based structure level 1 dcl 9-52 set ref 377 465* 467 470 471 493 623 624 vrloc based structure level 1 dcl 68 wordl 000271 automatic fixed bin(17,0) dcl 102 set ref 413* 414 419 543* 549 words parameter fixed bin(18,0) dcl 684 in procedure "relbits" ref 681 695 words based structure array level 2 in structure "rloc" packed packed unaligned dcl 64 in procedure "create_data_segment_" words based structure array level 2 in structure "vrloc" packed packed unaligned dcl 68 in procedure "create_data_segment_" zeroword 000302 automatic fixed bin(18,0) dcl 110 set ref 261* 269 270 333 NAMES DECLARED BY DECLARE STATEMENT AND NEVER REFERENCED. RETURN_PTR_MASK internal static bit(72) initial packed unaligned dcl 2-19 TRANSLATOR_ID_ALM internal static bit(18) initial packed unaligned dcl 2-25 TRANSLATOR_ID_PL1V1 internal static bit(18) initial packed unaligned dcl 2-26 TRANSLATOR_ID_PL1V2 internal static bit(18) initial packed unaligned dcl 2-24 TRANSLATOR_ID_SIGNALLER internal static bit(18) initial packed unaligned dcl 2-28 TRANSLATOR_ID_SIGNAL_CALLER internal static bit(18) initial packed unaligned dcl 2-27 encoded_value based structure level 1 dcl 11-70 exp_word based structure level 1 dcl 9-21 header based structure level 1 dcl 9-31 link based structure level 1 dcl 9-11 linkage_header_flags based structure level 1 dcl 9-44 name based structure level 1 dcl 9-70 rc_a_dp internal static bit(36) initial packed unaligned dcl 6-23 rc_dp_dp internal static bit(36) initial packed unaligned dcl 6-23 rc_e internal static bit(18) initial packed unaligned dcl 6-6 rc_is15 internal static bit(18) initial packed unaligned dcl 6-6 rc_lb internal static bit(18) initial packed unaligned dcl 6-6 rc_lp15 internal static bit(18) initial packed unaligned dcl 6-6 rc_nlb internal static bit(18) initial packed unaligned dcl 6-6 rc_nlp18 internal static bit(18) initial packed unaligned dcl 6-6 rc_ns internal static bit(18) initial packed unaligned dcl 6-6 rc_nt internal static bit(18) initial packed unaligned dcl 6-6 rc_sr internal static bit(18) initial packed unaligned dcl 6-6 runtime_block based structure level 1 dcl 11-38 runtime_bound based structure level 1 unaligned dcl 11-33 runtime_token based structure level 1 dcl 11-63 stack_frame_min_length internal static fixed bin(17,0) initial dcl 2-33 trap_word based structure level 1 dcl 9-66 type_pair based structure level 1 dcl 9-25 NAMES DECLARED BY EXPLICIT CONTEXT. alloc_acc 003476 constant entry internal dcl 407 ref 283 300 392 clupper 003011 constant entry internal dcl 215 ref 213 226 640 create_data_segment_ 000325 constant entry external dcl 40 ref 508 find_runtime_symbol_node 003703 constant entry internal dcl 644 ref 178 186 194 generate_definitions 003054 constant entry internal dcl 335 ref 311 320 329 hell 000772 constant label dcl 226 ref 235 366 irloc 004275 constant entry internal dcl 700 ref 696 697 putstr 003600 constant entry internal dcl 533 ref 528 531 578 relbits 004161 constant entry internal dcl 681 ref 595 596 597 598 skip_def 003463 constant label dcl 397 ref 373 tranfai 000424 constant label dcl 166 ref 205 228 661 667 673 THERE WERE NO NAMES DECLARED BY CONTEXT OR IMPLICATION. STORAGE REQUIREMENTS FOR THIS PROGRAM. Object Text Link Symbol Defs Static Start 0 0 4656 4730 4364 4666 Length 5360 4364 52 413 272 0 BLOCK NAME STACK SIZE TYPE WHY NONQUICK/WHO SHARES STACK FRAME create_data_segment_ 591 external procedure is an external procedure. on unit on line 213 64 on unit clupper 78 internal procedure is called by several nonquick procedures. generate_definitions internal procedure shares stack frame of external procedure create_data_segment_. alloc_acc 67 internal procedure is called during a stack extension. putstr 66 internal procedure is called during a stack extension. find_runtime_symbol_node internal procedure shares stack frame of external procedure create_data_segment_. relbits internal procedure shares stack frame of external procedure create_data_segment_. irloc internal procedure shares stack frame of external procedure create_data_segment_. STORAGE FOR AUTOMATIC VARIABLES. STACK FRAME LOC IDENTIFIER BLOCK NAME create_data_segment_ 000100 infop create_data_segment_ 000102 stucode create_data_segment_ 000103 slen create_data_segment_ 000104 tlen create_data_segment_ 000105 llen create_data_segment_ 000106 movdef create_data_segment_ 000110 hp create_data_segment_ 000112 smp create_data_segment_ 000114 osmp create_data_segment_ 000116 osymp create_data_segment_ 000120 defp create_data_segment_ 000122 class3ptr create_data_segment_ 000124 scrps create_data_segment_ 000136 rp create_data_segment_ 000140 putp create_data_segment_ 000142 rlocp create_data_segment_ 000144 tptr create_data_segment_ 000146 sptr create_data_segment_ 000150 lptr create_data_segment_ 000152 now create_data_segment_ 000154 dtmc create_data_segment_ 000156 oi create_data_segment_ 000244 strptr create_data_segment_ 000246 i create_data_segment_ 000256 sgp create_data_segment_ 000260 aclip create_data_segment_ 000262 dhp create_data_segment_ 000264 opp create_data_segment_ 000266 smrcp create_data_segment_ 000270 copylen create_data_segment_ 000271 wordl create_data_segment_ 000272 n create_data_segment_ 000273 bc create_data_segment_ 000274 prevdef create_data_segment_ 000276 pv create_data_segment_ 000300 next create_data_segment_ 000301 ojnxt create_data_segment_ 000302 zeroword create_data_segment_ 000304 strc1p create_data_segment_ 000306 strcopy1l create_data_segment_ 000307 oname create_data_segment_ 000320 header_ptr create_data_segment_ 000322 block_ptr create_data_segment_ 000324 tnode create_data_segment_ 000326 lnode create_data_segment_ 000330 snode create_data_segment_ 000332 cp create_data_segment_ 000334 code create_data_segment_ 000335 lsize create_data_segment_ 000336 sysize create_data_segment_ 000337 tsize create_data_segment_ 000340 dsize create_data_segment_ 000341 ssize create_data_segment_ 000342 srel create_data_segment_ 000343 lrel create_data_segment_ 000344 drel create_data_segment_ 000345 syrel create_data_segment_ 000346 sp create_data_segment_ 000362 v2 generate_definitions 000364 point generate_definitions 000376 node find_runtime_symbol_node 000406 rhp relbits 000410 bitpos relbits THE FOLLOWING EXTERNAL OPERATORS ARE USED BY THIS PROGRAM. alloc_char_temp call_ext_out_desc call_ext_out call_int_this_desc call_int_this call_int_other return_mac mdfx1 enable_op shorten_stack ext_entry int_entry int_entry_desc clock_mac THE FOLLOWING EXTERNAL ENTRIES ARE CALLED BY THIS PROGRAM. check_star_name_$entry com_err_ date_time_$format get_group_id_ get_temp_segments_ get_wdir_ hcs_$status_mins match_star_name_ object_info_$brief release_temp_segments_ stu_$decode_runtime_value stu_$find_runtime_symbol stu_$get_runtime_block tssi_$clean_up_segment tssi_$finish_segment tssi_$get_segment THE FOLLOWING EXTERNAL VARIABLES ARE USED BY THIS PROGRAM. error_table_$translation_failed LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC 40 000321 154 000332 155 000336 157 000337 159 000346 160 000351 162 000353 163 000373 165 000377 166 000424 168 000430 171 000431 172 000435 174 000440 176 000443 177 000445 178 000447 179 000471 180 000472 182 000474 184 000501 185 000503 186 000505 187 000527 188 000530 190 000532 192 000541 193 000543 194 000545 195 000567 196 000570 200 000572 201 000603 202 000623 204 000627 205 000661 207 000662 211 000664 212 000677 213 000701 222 000723 223 000744 225 000746 226 000772 228 000776 231 000777 232 001036 234 001042 235 001070 240 001071 241 001074 242 001077 243 001100 244 001101 246 001103 248 001107 249 001113 250 001117 252 001125 253 001126 257 001130 259 001133 260 001136 261 001145 263 001146 267 001147 268 001152 269 001155 270 001162 271 001167 272 001170 273 001171 274 001174 276 001204 277 001206 279 001210 280 001213 281 001217 283 001221 284 001255 285 001261 289 001262 290 001264 291 001270 292 001272 293 001276 294 001300 295 001302 296 001306 297 001310 298 001313 299 001317 300 001321 301 001344 302 001356 303 001360 307 001362 310 001371 311 001376 316 001401 319 001410 320 001415 325 001421 328 001430 329 001435 332 001441 333 001446 427 001454 428 001455 430 001461 432 001463 433 001465 434 001472 437 001474 440 001500 441 001502 442 001504 443 001507 444 001520 449 001522 450 001524 452 001526 453 001530 454 001533 455 001541 458 001543 459 001547 460 001550 462 001551 463 001555 464 001560 465 001561 466 001564 467 001571 468 001600 470 001602 471 001604 473 001606 475 001610 476 001612 477 001617 479 001621 480 001623 482 001625 483 001630 484 001636 485 001640 486 001642 487 001645 488 001656 490 001667 491 001671 493 001672 494 001674 495 001703 496 001711 497 001713 498 001716 502 001720 503 001722 504 001725 506 001730 507 001731 508 001734 510 001737 511 001756 513 001760 514 001762 515 002001 519 002006 520 002010 521 002012 522 002016 523 002020 524 002022 525 002024 526 002027 527 002031 528 002034 531 002130 555 002201 556 002204 557 002222 559 002224 560 002226 563 002245 564 002247 565 002255 566 002261 567 002267 568 002273 569 002274 570 002276 571 002302 572 002306 573 002310 574 002313 575 002317 576 002327 577 002337 578 002342 579 002377 580 002404 581 002410 585 002412 586 002415 590 002427 591 002437 592 002446 593 002452 595 002454 596 002471 597 002505 598 002523 600 002541 601 002543 605 002544 606 002550 607 002553 608 002555 609 002560 610 002565 611 002572 612 002577 613 002604 615 002617 616 002624 618 002626 619 002633 620 002640 621 002642 623 002643 624 002652 626 002662 627 002667 628 002674 629 002700 630 002702 631 002710 632 002712 633 002715 634 002723 635 002724 636 002750 637 002752 640 003003 642 003007 215 003010 217 003016 218 003037 220 003053 335 003054 348 003056 349 003062 350 003064 351 003077 353 003140 355 003142 357 003144 360 003152 362 003204 364 003206 366 003260 368 003261 370 003272 373 003340 377 003341 380 003351 381 003355 382 003356 383 003366 384 003371 385 003376 386 003400 387 003403 388 003411 389 003413 391 003417 392 003421 394 003454 395 003457 396 003462 400 003463 402 003471 403 003474 407 003475 412 003511 413 003516 414 003522 415 003532 416 003547 417 003551 418 003555 419 003566 420 003570 421 003571 422 003574 533 003577 542 003613 543 003625 544 003631 545 003642 546 003644 547 003650 548 003666 549 003674 550 003676 551 003702 644 003703 656 003721 657 003774 659 003777 661 004042 664 004043 666 004050 667 004107 670 004110 672 004113 673 004152 676 004153 681 004161 688 004163 690 004165 691 004167 692 004171 693 004173 695 004177 696 004207 697 004217 698 004232 714 004234 715 004240 716 004244 717 004247 718 004250 719 004270 720 004274 700 004275 703 004277 705 004304 706 004311 707 004312 709 004313 710 004320 712 004322 ----------------------------------------------------------- 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