COMPILATION LISTING OF SEGMENT le_emit_defs_ Compiled by: Multics PL/I Compiler, Release 29, of July 28, 1986 Compiled at: Honeywell Multics Op. - System M Compiled on: 12/10/86 1255.6 mst Wed Options: optimize map 1 /****^ *********************************************************** 2* * * 3* * Copyright, (C) Honeywell Information Systems Inc., 1986 * 4* * * 5* *********************************************************** */ 6 7 /****^ HISTORY COMMENTS: 8* 1) change(86-08-12,Elhard), approve(86-08-12,MCR7505), 9* audit(86-12-10,DGHowe), install(86-12-10,MR12.0-1241): 10* Originally written to emit the definitions for a single component. 11* END HISTORY COMMENTS */ 12 13 /* format: style1,insnl,ifthendo,indthenelse,^indnoniterdo,^inditerdo,indcom,^indthenbegin,^indprocbody,ind2,ll78,initcol0,dclind4,idind24,struclvlind1,comcol41 */ 14 15 le_emit_defs_: 16 proc (ocudp, /** ocu_data pointer (in ) */ 17 lecp, /** components pointer (i/o) */ 18 c); /** component index (in ) */ 19 20 /*** ****************************************************************/ 21 /*** */ 22 /*** Name: le_emit_defs_ */ 23 /*** Input: ocudp, lecp, c */ 24 /*** Function: emits the definitions for a given component. */ 25 /*** Output: lecp */ 26 /*** */ 27 /*** ****************************************************************/ 28 29 /* constants */ 30 31 dcl true bit (1) static options (constant) init ("1"b); 32 dcl false bit (1) static options (constant) init ("0"b); 33 dcl hdr_size fixed bin static options (constant) init (8); 34 35 /* parameters */ 36 37 dcl ocudp ptr parameter; 38 dcl lecp ptr parameter; 39 dcl c fixed bin parameter; 40 41 /* procedures */ 42 43 dcl le_error_ entry options (variable); 44 dcl le_snap_ entry (ptr, ptr, fixed bin, fixed bin (3), 45 uns fixed bin (18), uns fixed bin (18), bit (1), 46 fixed bin (3), uns fixed bin (18), bit (6), 47 bit (1)); 48 49 /* external */ 50 51 dcl error_table_$bad_class_def 52 external fixed bin (35); 53 54 /* based */ 55 56 dcl 01 lec aligned based (lecp), 57 02 header aligned like le_components.header, 58 02 comp dim (0 refer (lec.n_components)) like le_comp; 59 dcl 01 les aligned based (lesp), 60 02 header aligned like le_segnames.header, 61 02 segname dim (0 refer (les.n_segnames)) 62 like le_segnames.segname; 63 dcl 01 led aligned based (ledp), 64 02 header aligned like le_definitions.header, 65 02 def dim (0 refer (led.n_defs)) like le_definition; 66 67 /* automatic */ 68 69 dcl chase fixed bin automatic; 70 dcl flags bit (4) automatic; 71 dcl ignore_block bit (1) automatic; 72 dcl internal bit (1) automatic; 73 dcl ledp ptr automatic; 74 dcl lelp ptr automatic; 75 dcl lesp ptr automatic; 76 dcl library bit (1) automatic; 77 dcl link_ref bit (1) automatic; 78 dcl modifier bit (6) automatic; 79 dcl new_relp fixed bin (18) unsigned automatic; 80 dcl relp fixed bin (18) unsigned automatic; 81 dcl section fixed bin (3) automatic; 82 dcl stat_relp fixed bin (18) unsigned automatic; 83 dcl symb_relp fixed bin (18) unsigned automatic; 84 dcl text_relp fixed bin (18) unsigned automatic; 85 dcl type fixed bin automatic; 86 87 /* builtin */ 88 89 dcl null builtin; 90 dcl rtrim builtin; 91 92 /* get the table pointers */ 93 94 lesp = lec.comp (c).tables.lesp; 95 ledp = lec.comp (c).tables.ledp; 96 lelp = lec.comp (c).tables.lelp; 97 98 /* get the relocation counters */ 99 100 text_relp = lec.comp (c).new.rel_text; 101 stat_relp = lec.comp (c).new.rel_stat; 102 symb_relp = lec.comp (c).new.rel_symb; 103 104 library = lec.comp (c).flags.library; 105 106 ignore_block = true; 107 108 /* see if any definitions in this block are being emitted */ 109 110 do chase = 1 to led.n_defs while (ignore_block); 111 112 /* unreferenced library entrypoints are deleted regardless */ 113 114 if library & ^led.def (chase).flags.referenced 115 then do; 116 led.def (chase).flags.retain, led.def (chase).flags.no_link = false; 117 led.def (chase).flags.delete = true; 118 end; 119 120 /* if we find a non-deleted entrypoint, then we keep the block */ 121 122 if led.def (chase).flags.retain & ^led.def (chase).flags.ignore 123 then ignore_block = false; 124 end; 125 126 /* set the ignore flag for the segnames if we are ignoring the block */ 127 128 if ignore_block 129 then flags = DEFINITION_FLAGS_IGNORE; 130 else flags = ""b; 131 132 /* emit the segnames for the block */ 133 134 do chase = 1 to les.n_segnames; 135 les.segname (chase).relp = ocu_$emit_segname (ocudp, 136 rtrim (les.segname (chase).str), flags); 137 end; 138 139 /* now emit the definitions in the block */ 140 141 do chase = 1 to led.n_defs; 142 143 /* see if this definition should be emitted */ 144 145 if (^led.def (chase).delete & ^led.def (chase).ignore) | 146 led.def (chase).force_retain 147 then do; 148 149 /* set the definition flags */ 150 151 if led.def (chase).flags.force_retain 152 then flags = DEFINITION_FLAGS_RETAIN; 153 else flags = ""b; 154 if led.def (chase).flags.ignore | led.def (chase).flags.delete 155 then flags = flags | DEFINITION_FLAGS_IGNORE; 156 type = led.def (chase).type; 157 158 /* handle the definition based on the target section */ 159 160 if type = Text 161 then do; 162 163 /* text reference: relocate it and check to see if it is */ 164 /* an entrypoint. Then emit it. */ 165 166 relp = led.def (chase).relp + text_relp; 167 if led.def (chase).flags.entrypoint 168 then flags = flags | DEFINITION_FLAGS_ENTRY; 169 led.def (chase).new_offset = ocu_$emit_definition (ocudp, 170 led.def (chase).str, Text, relp, flags); 171 end; 172 else if type = Symbol 173 then do; 174 175 /* symbol reference: just relocate and emit. */ 176 177 relp = led.def (chase).relp + symb_relp; 178 led.def (chase).new_offset = ocu_$emit_definition (ocudp, 179 led.def (chase).str, Symbol, relp, flags); 180 end; 181 else if type = Static 182 then do; 183 184 /* static reference: just relocate and emit. */ 185 186 relp = led.def (chase).relp + stat_relp; 187 led.def (chase).new_offset = ocu_$emit_definition (ocudp, 188 led.def (chase).str, Static, relp, flags); 189 end; 190 else if type = Linkage 191 then do; 192 193 /* linkage reference: see if it is actually a reference */ 194 /* to combined static. If so, relocate */ 195 /* and emit. If not, we have a link */ 196 /* reference, so we snap the link to */ 197 /* remove excess indirection, but then */ 198 /* we must insure that the target of */ 199 /* the definition is a link, so if it */ 200 /* did not resolve to the linkage */ 201 /* section, we emit a type-1 link to */ 202 /* the target and have the definition */ 203 /* point there. */ 204 205 if lec.comp (c).flags.separate_static 206 then link_ref = true; 207 else if led.def (chase).relp > hdr_size + lec.comp (c).orig.defnl 208 then link_ref = true; 209 else link_ref = false; 210 211 if ^link_ref 212 then do; 213 214 /* we have a reference to a combined static section */ 215 /* so we convert it back to a static reference and */ 216 /* emit the definition with the appropriate reloc */ 217 218 relp = led.def (chase).relp + stat_relp - hdr_size; 219 led.def (chase).new_offset = ocu_$emit_definition (ocudp, 220 led.def (chase).str, Static, relp, flags); 221 end; 222 else do; 223 224 /* we have a reference to a link, which may indirect */ 225 /* through another link (ie. a PASCAL exportable */ 226 /* variable represented as a link.) So we first see */ 227 /* if this link was resolved somewhere, and if it is, */ 228 /* we generate a type-1 (link-self-base) link to the */ 229 /* eventual target. */ 230 231 call le_snap_ (ocudp, lecp, c, Definition, 232 led.def (chase).offset + 1, relp, false, section, 233 new_relp, modifier, internal); 234 if section ^= Linkage 235 then new_relp = ocu_$emit_link (ocudp, Self_Base, section, 236 "", "", (new_relp), modifier, null); 237 238 led.def (chase).new_offset = ocu_$emit_definition (ocudp, 239 led.def (chase).str, Linkage, new_relp, flags); 240 end; 241 end; 242 else call le_error_ (LE_FATAL_ERROR, error_table_$bad_class_def, 243 "^/at def|^o in component ^a.", led.def (chase).offset, 244 lec.comp (c).name); 245 end; 246 end; 247 248 return; 249 250 /**** * * * * * * * * * * * * * * * * * * * * * * * */ 251 252 /**** * * * * * * * * * * * * * * * * * * * * * * * */ 253 254 1 1 /**** START OF: le_data.incl.pl1 * * * * * */ 1 2 1 3 /****^ HISTORY COMMENTS: 1 4* 1) change(86-08-12,Elhard), approve(86-08-12,MCR7505), 1 5* audit(86-12-10,DGHowe), install(86-12-10,MR12.0-1241): 1 6* Originally written to define the structures used internally by le_. 1 7* END HISTORY COMMENTS */ 1 8 1 9 /*** ****************************************************************/ 1 10 /*** */ 1 11 /*** Name: le_data */ 1 12 /*** Function: This include file defines the data structures */ 1 13 /*** used internally by the linkage_editor subroutine. */ 1 14 /*** */ 1 15 /*** ****************************************************************/ 1 16 1 17 /* error severity constants */ 1 18 1 19 dcl LE_WARNING fixed bin static options (constant) init (1); 1 20 dcl LE_ERROR fixed bin static options (constant) init (2); 1 21 dcl LE_FATAL_ERROR fixed bin static options (constant) init (3); 1 22 dcl LE_ABORT_ERROR fixed bin static options (constant) init (4); 1 23 1 24 /* section identifier constants */ 1 25 1 26 dcl Text fixed bin (3) static options (constant) 1 27 init (0); 1 28 dcl Linkage fixed bin (3) static options (constant) 1 29 init (1); 1 30 dcl Symbol fixed bin (3) static options (constant) 1 31 init (2); 1 32 dcl Definition fixed bin (3) static options (constant) 1 33 init (3); 1 34 dcl Static fixed bin (3) static options (constant) 1 35 init (4); 1 36 dcl System fixed bin (3) static options (constant) 1 37 init (5); 1 38 dcl Heap fixed bin (3) static options (constant) 1 39 init (6); 1 40 1 41 dcl section_nm (0:6) char (16) static options (constant) 1 42 init ("text", "linkage", "symbol", "definition", 1 43 "static", "system", "heap"); 1 44 1 45 /* link type constants */ 1 46 1 47 dcl Self_Base fixed bin (3) static options (constant) 1 48 init (1); 1 49 dcl Refname_Base fixed bin (3) static options (constant) 1 50 init (3); 1 51 dcl Refname_Offsetname fixed bin (3) static options (constant) 1 52 init (4); 1 53 dcl Self_Offsetname fixed bin (3) static options (constant) 1 54 init (5); 1 55 1 56 /* backpatch type constants */ 1 57 1 58 dcl Patch_Link fixed bin static options (constant) init (1); 1 59 dcl Patch_Init fixed bin static options (constant) init (2); 1 60 dcl Patch_Symbol_Ref fixed bin static options (constant) init (3); 1 61 dcl Patch_Self_Init fixed bin static options (constant) init (4); 1 62 1 63 /*** ****************************************************************/ 1 64 /*** */ 1 65 /*** Name: le_components */ 1 66 /*** Function: the component table is used to keep information */ 1 67 /*** about the input components being used and their */ 1 68 /*** disposition in output components. */ 1 69 /*** */ 1 70 /*** ****************************************************************/ 1 71 1 72 dcl 01 le_components aligned based, 1 73 02 header aligned, 1 74 03 flags aligned, 1 75 04 separate_static bit (1) unaligned, 1 76 04 perprocess_static bit (1) unaligned, 1 77 04 mbz bit (34) unaligned, 1 78 03 n_components fixed bin, 1 79 02 comp (0 refer (le_components.n_components)) 1 80 like le_comp; 1 81 1 82 /*** ****************************************************************/ 1 83 /*** */ 1 84 /*** Name: le_comp */ 1 85 /*** Function: this is a single component table entry. */ 1 86 /*** */ 1 87 /*** ****************************************************************/ 1 88 1 89 dcl 01 le_comp aligned based, 1 90 02 segp ptr, 1 91 02 bc fixed bin (24), 1 92 02 uid bit (36) aligned, 1 93 02 dtcm fixed bin (71), 1 94 02 name char (32) varying, 1 95 02 path char (194) varying, 1 96 02 compiler char (8), 1 97 02 target fixed bin, 1 98 02 flags aligned, 1 99 03 library bit (1) unaligned, 1 100 03 include bit (1) unaligned, 1 101 03 delete_table bit (1) unaligned, 1 102 03 separate_static bit (1) unaligned, 1 103 03 io_table bit (1) unaligned, 1 104 03 unique_path bit (1) unaligned, 1 105 03 mbz bit (30) unaligned, 1 106 02 tables aligned, 1 107 03 lesp ptr, 1 108 03 ledp ptr, 1 109 03 lelp ptr, 1 110 02 orig aligned, 1 111 03 textp ptr, 1 112 03 defnp ptr, 1 113 03 linkp ptr, 1 114 03 statp ptr, 1 115 03 symbp ptr, 1 116 03 rel_textp ptr, 1 117 03 rel_symbp ptr, 1 118 03 rel_linkp ptr, 1 119 03 textl fixed bin (18) unsigned unaligned, 1 120 03 defnl fixed bin (18) unsigned unaligned, 1 121 03 linkl fixed bin (18) unsigned unaligned, 1 122 03 statl fixed bin (18) unsigned unaligned, 1 123 03 symbl fixed bin (18) unsigned unaligned, 1 124 03 symbl_no_rel fixed bin (18) unsigned unaligned, 1 125 03 symbl_no_table fixed bin (18) unsigned unaligned, 1 126 03 n_symb_blocks fixed bin (18) unsigned unaligned, 1 127 03 text_boundary fixed bin (9) unsigned unaligned, 1 128 03 static_boundary fixed bin (9) unsigned unaligned, 1 129 03 next_comp fixed bin (18) unsigned unaligned, 1 130 02 new aligned, 1 131 03 rel_text fixed bin (18) unsigned unaligned, 1 132 03 rel_symb fixed bin (18) unsigned unaligned, 1 133 03 rel_stat fixed bin (18) unsigned unaligned, 1 134 03 text_pad fixed bin (18) unsigned unaligned, 1 135 03 static_pad fixed bin (18) unsigned unaligned, 1 136 03 symbol_pad fixed bin (18) unsigned unaligned; 1 137 1 138 /*** ****************************************************************/ 1 139 /*** */ 1 140 /*** Name: le_segnames */ 1 141 /*** Function: the segname table is used for two purposes: */ 1 142 /*** - to determine the target components of links */ 1 143 /*** being resolved internally. */ 1 144 /*** - to determine the segname definitions to be */ 1 145 /*** emited for definitions being retained. */ 1 146 /*** */ 1 147 /*** ****************************************************************/ 1 148 1 149 dcl 01 le_segnames aligned based, 1 150 02 header aligned, 1 151 03 n_segnames fixed bin, 1 152 02 segname (segname_count refer (le_segnames.n_segnames)), 1 153 03 str char (32) varying, 1 154 03 relp fixed bin (18) unsigned unaligned, 1 155 03 pad bit (18) unaligned; 1 156 dcl segname_count fixed bin automatic; 1 157 1 158 /*** ****************************************************************/ 1 159 /*** */ 1 160 /*** Name: le_definitions */ 1 161 /*** Function: the definition table contains the definitions */ 1 162 /*** from the input components and is used to resolve */ 1 163 /*** link targets, and regenerate definition entries */ 1 164 /*** */ 1 165 /*** ****************************************************************/ 1 166 1 167 dcl 01 le_definitions aligned based, 1 168 02 header aligned, 1 169 03 n_defs fixed bin, 1 170 03 pad bit (36), 1 171 02 def (def_count refer (le_definitions.n_defs)) 1 172 like le_definition; 1 173 dcl def_count fixed bin automatic; 1 174 1 175 dcl 01 le_definition aligned based, 1 176 02 str char (256) varying, 1 177 02 type fixed bin (18) unsigned unaligned, 1 178 02 relp fixed bin (18) unsigned unaligned, 1 179 02 offset fixed bin (18) unsigned unaligned, 1 180 02 new_offset fixed bin (18) unsigned unaligned, 1 181 02 flags aligned, 1 182 03 force_retain bit (1) unaligned, 1 183 03 entrypoint bit (1) unaligned, 1 184 03 ignore bit (1) unaligned, 1 185 03 referenced bit (1) unaligned, 1 186 03 no_link bit (1) unaligned, 1 187 03 retain bit (1) unaligned, 1 188 03 delete bit (1) unaligned, 1 189 03 mbz bit (29) unaligned; 1 190 1 191 /*** ****************************************************************/ 1 192 /*** */ 1 193 /*** Name: le_options */ 1 194 /*** Function: the option table contains definition retention */ 1 195 /*** information. The input retentions options are */ 1 196 /*** ordered such that a linear search of the option */ 1 197 /*** table for the first matching starname will give */ 1 198 /*** the correct retention state. */ 1 199 /*** */ 1 200 /*** ****************************************************************/ 1 201 1 202 dcl 01 le_options aligned based, 1 203 02 header aligned, 1 204 03 n_opts fixed bin, 1 205 02 opt (0 refer (le_options.n_opts)), 1 206 03 type fixed bin (8) unaligned, 1 207 03 used bit (1) unaligned, 1 208 03 inhibit_error bit (1) unaligned, 1 209 03 class fixed bin (6) unaligned, 1 210 03 order fixed bin (17) unaligned, 1 211 03 segname char (32) unaligned, 1 212 03 ep_name char (256) unaligned; 1 213 1 214 /*** ****************************************************************/ 1 215 /*** */ 1 216 /*** Name: le_links */ 1 217 /*** Function: the link table contains information on all of the */ 1 218 /*** links in the input components. It is used to */ 1 219 /*** determine link targets, which library components */ 1 220 /*** will be included, and what init_info will be */ 1 221 /*** used, and where it will be placed. */ 1 222 /*** */ 1 223 /*** ****************************************************************/ 1 224 1 225 dcl 01 le_links aligned based, 1 226 02 header aligned, 1 227 03 offset_adjustment fixed bin (18), 1 228 03 n_links fixed bin, 1 229 02 link (link_count refer (le_links.n_links)) 1 230 like le_link; 1 231 dcl link_count fixed bin automatic; 1 232 1 233 dcl 01 le_link aligned based, 1 234 02 flags unaligned, 1 235 03 used bit (1), 1 236 03 mbx bit (35), 1 237 02 type fixed bin (6) unsigned unaligned, 1 238 02 class fixed bin (6) unsigned unaligned, 1 239 02 mod bit (6) unaligned, 1 240 02 exp fixed bin (17) unaligned, 1 241 02 target fixed bin (18) unsigned unaligned, 1 242 02 defx fixed bin (18) unsigned unaligned, 1 243 02 relp fixed bin (18) unsigned unaligned, 1 244 02 target_comp fixed bin (18) unsigned unaligned, 1 245 02 target_link fixed bin (18) unsigned unaligned, 1 246 02 extension fixed bin (18) unsigned unaligned, 1 247 02 initp ptr unaligned, 1 248 02 segnamep ptr unaligned, 1 249 02 offsetp ptr unaligned; 1 250 1 251 /*** ****************************************************************/ 1 252 /*** */ 1 253 /*** Name: le_binaries */ 1 254 /*** Function: This table contains information about the output */ 1 255 /*** binaries. It is primarily used for creation and */ 1 256 /*** backpatching of MSF output. */ 1 257 /*** */ 1 258 /*** ****************************************************************/ 1 259 1 260 dcl 01 le_binaries aligned based, 1 261 02 header aligned, 1 262 03 n_binaries fixed bin, 1 263 03 pad bit (36), 1 264 02 binary (0:0 refer (le_binaries.n_binaries)), 1 265 03 segp ptr, 1 266 03 bc fixed bin (24), 1 267 03 uid bit (36), 1 268 03 aclc fixed bin, 1 269 03 aclp ptr, 1 270 03 textp ptr, 1 271 03 defnp ptr, 1 272 03 linkp ptr, 1 273 03 symbp ptr, 1 274 03 statp ptr, 1 275 03 textl fixed bin (18) unsigned unaligned, 1 276 03 defnl fixed bin (18) unsigned unaligned, 1 277 03 linkl fixed bin (18) unsigned unaligned, 1 278 03 symbl fixed bin (18) unsigned unaligned, 1 279 03 statl fixed bin (18) unsigned unaligned, 1 280 03 mbz2 bit (18) unaligned; 1 281 1 282 /*** ****************************************************************/ 1 283 /*** */ 1 284 /*** Name: le_patches */ 1 285 /*** Function: This table contains the list of backpatches to be */ 1 286 /*** performed when the rest of the object creation is */ 1 287 /*** complete. Since le_backpatch_ is the only routine */ 1 288 /*** concerned with this, it is maintained completely */ 1 289 /*** internal to le_backpatch_. */ 1 290 /*** */ 1 291 /*** ****************************************************************/ 1 292 1 293 dcl 01 le_patches aligned based, 1 294 02 header aligned, 1 295 03 n_patches fixed bin, 1 296 02 patch (0 refer (le_patches.n_patches)) like le_patch; 1 297 1 298 dcl 01 le_patch aligned based, 1 299 02 type fixed bin, 1 300 02 comp fixed bin, 1 301 02 relp fixed bin (18) unsigned, 1 302 02 target fixed bin, 1 303 02 index fixed bin; 1 304 1 305 /**** END OF: le_data.incl.pl1 * * * * * */ 255 2 1 /* START OF: ocu_dcls.incl.pl1 * * * * * */ 2 2 2 3 /****^ HISTORY COMMENTS: 2 4* 1) change(86-08-12,Elhard), approve(86-08-12,MCR7505), 2 5* audit(86-12-10,DGHowe), install(86-12-10,MR12.0-1241): 2 6* Originally written to define the subroutines and data structures used by 2 7* callers of ocu_. 2 8* END HISTORY COMMENTS */ 2 9 2 10 /*** ****************************************************************/ 2 11 /*** */ 2 12 /*** Name: ocu_dcls */ 2 13 /*** Function: These are the entrypoints and structures required */ 2 14 /*** to use the ocu_ object creation utilities. */ 2 15 /*** */ 2 16 /*** ****************************************************************/ 2 17 2 18 /* open option flags */ 2 19 2 20 dcl OPEN_FLAGS_BOUND bit (6) static options (constant) 2 21 init ("100000"b); 2 22 dcl OPEN_FLAGS_RELOCATABLE bit (6) static options (constant) 2 23 init ("010000"b); 2 24 dcl OPEN_FLAGS_PROCEDURE bit (6) static options (constant) 2 25 init ("001000"b); 2 26 dcl OPEN_FLAGS_SEPARATE_STATIC 2 27 bit (6) static options (constant) 2 28 init ("000100"b); 2 29 dcl OPEN_FLAGS_PERPROCESS_STATIC 2 30 bit (6) static options (constant) 2 31 init ("000010"b); 2 32 dcl OPEN_FLAGS_NO_HASHTABLE bit (6) static options (constant) 2 33 init ("000001"b); 2 34 2 35 /* definition flags */ 2 36 2 37 dcl DEFINITION_FLAGS_IGNORE bit (4) static options (constant) init ("1000"b); 2 38 dcl DEFINITION_FLAGS_ENTRY bit (4) static options (constant) init ("0100"b); 2 39 dcl DEFINITION_FLAGS_RETAIN bit (4) static options (constant) init ("0010"b); 2 40 dcl DEFINITION_FLAGS_INDIRECT 2 41 bit (4) static options (constant) init ("0001"b); 2 42 2 43 /* input structures */ 2 44 2 45 dcl word_arrayp ptr; 2 46 dcl word_arrayl fixed bin (18) unsigned; 2 47 2 48 dcl word_array(word_arrayl) bit (36) based (word_arrayp); 2 49 2 50 dcl reloc_strp ptr; 2 51 dcl reloc_strl fixed bin (21); 2 52 2 53 dcl reloc_str char (reloc_strl) based (reloc_strp); 2 54 2 55 dcl component_listp ptr; 2 56 dcl component_count fixed bin (15) unsigned; 2 57 2 58 dcl component_list (1:component_count) 2 59 ptr based (component_listp); 2 60 2 61 dcl 01 gen_info aligned based, 2 62 02 gen_created fixed bin (71), 2 63 02 generator char (8), 2 64 02 gen_number fixed bin, 2 65 02 gen_version char (512) varying; 2 66 2 67 /* entrypoint declarations */ 2 68 2 69 dcl ocu_$open /* setup to create an object */ 2 70 entry (char(*), /* directory name (in ) */ 2 71 char(*), /* entry name (in ) */ 2 72 bit(*), /* option flags (in ) */ 2 73 ptr, /* ocu_data pointer (out) */ 2 74 fixed bin(35)); /* error code (out) */ 2 75 2 76 dcl ocu_$close /* create the object segment */ 2 77 entry (ptr, /* ocu_data pointer (in ) */ 2 78 fixed bin(35)); /* error code (out) */ 2 79 2 80 dcl ocu_$release /* release storage on cleanup */ 2 81 entry (ptr); /* ocu_data pointer (in ) */ 2 82 2 83 dcl ocu_$emit_text /* emit a block of text words */ 2 84 entry (ptr, /* ocu_data pointer (in ) */ 2 85 ptr, /* word array pointer (in ) */ 2 86 ptr, /* reloc string pointer (in ) */ 2 87 fixed bin (18) uns) /* word count (in ) */ 2 88 returns(fixed bin (18) uns); /* text relp (out) */ 2 89 2 90 dcl ocu_$emit_definition /* emit a single definition entry */ 2 91 entry (ptr, /* ocu_data pointer (in ) */ 2 92 char(*) var, /* definition name (in ) */ 2 93 fixed bin (3), /* target section (in ) */ 2 94 fixed bin (18) uns, /* offset in section (in ) */ 2 95 bit(*)) /* definition flags (in ) */ 2 96 returns(fixed bin (18) uns); /* definition relp (out) */ 2 97 2 98 dcl ocu_$emit_segname /* emit a single segname definition */ 2 99 entry (ptr, /* ocu_data pointer (in ) */ 2 100 char(*) var, /* segname (in ) */ 2 101 bit(*)) /* definition flags (in ) */ 2 102 returns(fixed bin (18) uns); /* definition relp (out) */ 2 103 2 104 dcl ocu_$emit_msf_map /* emit an msf map (MSF components) */ 2 105 entry (ptr, /* ocu_data pointer (in ) */ 2 106 fixed bin (15) uns, /* component count (in ) */ 2 107 fixed bin (15) uns); /* my component (in ) */ 2 108 2 109 dcl ocu_$emit_static /* emit a block of static words */ 2 110 entry (ptr, /* ocu_data pointer (in ) */ 2 111 ptr, /* word array pointer (in ) */ 2 112 fixed bin (18) uns) /* word count (in ) */ 2 113 returns(fixed bin (18) uns); /* static relp (out) */ 2 114 2 115 dcl ocu_$emit_link /* emit a single external link */ 2 116 entry (ptr, /* ocu_data pointer (in ) */ 2 117 fixed bin (3), /* link type (in ) */ 2 118 fixed bin (3), /* link class (in ) */ 2 119 char(*) var, /* target refname (in ) */ 2 120 char(*) var, /* target definition (in ) */ 2 121 fixed bin, /* expression offset (in ) */ 2 122 bit(6), /* link modifier (in ) */ 2 123 ptr) /* init info pointer (in ) */ 2 124 returns(fixed bin (18) uns); /* link relp (out) */ 2 125 2 126 dcl ocu_$emit_partial_link /* emit a single partial link */ 2 127 entry (ptr, /* ocu_data pointer (in ) */ 2 128 fixed bin (15) uns, /* target component (in ) */ 2 129 fixed bin (3), /* target section (in ) */ 2 130 fixed bin (18) uns, /* offset in section (in ) */ 2 131 bit(6)) /* link modifier (in ) */ 2 132 returns(fixed bin (18) uns); /* link relp (out) */ 2 133 2 134 dcl ocu_$emit_firstref_trap /* add a trap to the firstref block */ 2 135 entry (ptr, /* ocu_data pointer (in ) */ 2 136 fixed bin (18) uns, /* call relp (in ) */ 2 137 fixed bin (18) uns); /* info relp (in ) */ 2 138 2 139 dcl ocu_$emit_symbol /* emit a block of symbol words */ 2 140 entry (ptr, /* ocu_data pointer (in ) */ 2 141 ptr, /* word array pointer (in ) */ 2 142 ptr, /* reloc string pointer (in ) */ 2 143 fixed bin (18) uns) /* word count (in ) */ 2 144 returns(fixed bin (18) uns); /* symbol relp (out) */ 2 145 2 146 dcl ocu_$backpatch /* patch a word in the text/symbol scn */ 2 147 entry (ptr, /* ocu_data pointer (in ) */ 2 148 char(*), /* section (in ) */ 2 149 fixed bin (18) uns, /* offset in section (in ) */ 2 150 char(*), /* side and size (in ) */ 2 151 fixed bin (35)); /* new value to patch (in ) */ 2 152 2 153 dcl ocu_$create_msf /* create component 0 of the MSF */ 2 154 entry (ptr, /* component array ptr (in ) */ 2 155 fixed bin (15) uns, /* component count (in ) */ 2 156 ptr, /* generator info ptr (in ) */ 2 157 fixed bin(35)); /* error code (out) */ 2 158 2 159 /* END OF: ocu_dcls.incl.pl1 * * * * * */ 256 257 258 end le_emit_defs_; 259 SOURCE FILES USED IN THIS COMPILATION. LINE NUMBER DATE MODIFIED NAME PATHNAME 0 12/10/86 1251.7 le_emit_defs_.pl1 >special_ldd>install>MR12.0-1241>le_emit_defs_.pl1 255 1 12/10/86 1248.4 le_data.incl.pl1 >special_ldd>install>MR12.0-1241>le_data.incl.pl1 256 2 12/10/86 1248.0 ocu_dcls.incl.pl1 >special_ldd>install>MR12.0-1241>ocu_dcls.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. DEFINITION_FLAGS_ENTRY constant bit(4) initial unaligned dcl 2-38 ref 167 DEFINITION_FLAGS_IGNORE constant bit(4) initial unaligned dcl 2-37 ref 128 154 DEFINITION_FLAGS_RETAIN constant bit(4) initial unaligned dcl 2-39 ref 151 Definition 000014 constant fixed bin(3,0) initial dcl 1-32 set ref 231* LE_FATAL_ERROR 000014 constant fixed bin(17,0) initial dcl 1-21 set ref 242* Linkage 000017 constant fixed bin(3,0) initial dcl 1-28 set ref 190 234 238* Self_Base 000017 constant fixed bin(3,0) initial dcl 1-47 set ref 234* Static 000013 constant fixed bin(3,0) initial dcl 1-34 set ref 181 187* 219* Symbol 000016 constant fixed bin(3,0) initial dcl 1-30 set ref 172 178* Text 000011 constant fixed bin(3,0) initial dcl 1-26 set ref 160 169* c parameter fixed bin(17,0) dcl 39 set ref 15 94 95 96 100 101 102 104 205 207 231* 242 chase 000100 automatic fixed bin(17,0) dcl 69 set ref 110* 114 116 116 117 122 122* 134* 135 135 135* 141* 145 145 145 151 154 154 156 166 167 169 169 177 178 178 186 187 187 207 218 219 219 231 238 238 242* comp 2 based structure array level 2 dcl 56 def 2 based structure array level 2 dcl 63 defnl 136(18) based fixed bin(18,0) array level 4 packed unsigned unaligned dcl 56 ref 207 delete 105(06) based bit(1) array level 4 packed unaligned dcl 63 set ref 117* 145 154 entrypoint 105(01) based bit(1) array level 4 packed unaligned dcl 63 ref 167 error_table_$bad_class_def 000014 external static fixed bin(35,0) dcl 51 set ref 242* false 000011 constant bit(1) initial unaligned dcl 32 set ref 116 122 209 231* flags 105 based structure array level 3 in structure "led" dcl 63 in procedure "le_emit_defs_" flags 000101 automatic bit(4) unaligned dcl 70 in procedure "le_emit_defs_" set ref 128* 130* 135* 151* 153* 154* 154 167* 167 169* 178* 187* 219* 238* flags 106 based structure array level 3 in structure "lec" dcl 56 in procedure "le_emit_defs_" force_retain 105 based bit(1) array level 4 packed unaligned dcl 63 ref 145 151 hdr_size constant fixed bin(17,0) initial dcl 33 ref 207 218 header based structure level 2 in structure "le_definitions" dcl 1-167 in procedure "le_emit_defs_" header based structure level 2 in structure "le_components" dcl 1-72 in procedure "le_emit_defs_" header based structure level 2 in structure "le_segnames" dcl 1-149 in procedure "le_emit_defs_" header based structure level 2 in structure "led" dcl 63 in procedure "le_emit_defs_" header based structure level 2 in structure "les" dcl 59 in procedure "le_emit_defs_" ignore 105(02) based bit(1) array level 4 packed unaligned dcl 63 ref 122 145 154 ignore_block 000102 automatic bit(1) unaligned dcl 71 set ref 106* 110 122* 128 internal 000103 automatic bit(1) unaligned dcl 72 set ref 231* le_comp based structure level 1 dcl 1-89 le_components based structure level 1 dcl 1-72 le_definition based structure level 1 dcl 1-175 le_definitions based structure level 1 dcl 1-167 le_error_ 000010 constant entry external dcl 43 ref 242 le_link based structure level 1 dcl 1-233 le_patch based structure level 1 dcl 1-298 le_segnames based structure level 1 dcl 1-149 le_snap_ 000012 constant entry external dcl 44 ref 231 lec based structure level 1 dcl 56 lecp parameter pointer dcl 38 set ref 15 94 95 96 100 101 102 104 205 207 231* 242 led based structure level 1 dcl 63 ledp 112 based pointer array level 4 in structure "lec" dcl 56 in procedure "le_emit_defs_" ref 95 ledp 000104 automatic pointer dcl 73 in procedure "le_emit_defs_" set ref 95* 110 114 116 116 117 122 122 141 145 145 145 151 154 154 156 166 167 169 169 177 178 178 186 187 187 207 218 219 219 231 238 238 242 lelp 114 based pointer array level 4 in structure "lec" dcl 56 in procedure "le_emit_defs_" ref 96 lelp 000106 automatic pointer dcl 74 in procedure "le_emit_defs_" set ref 96* les based structure level 1 dcl 59 lesp 000110 automatic pointer dcl 75 in procedure "le_emit_defs_" set ref 94* 134 135 135 135 lesp 110 based pointer array level 4 in structure "lec" dcl 56 in procedure "le_emit_defs_" ref 94 library 000112 automatic bit(1) unaligned dcl 76 in procedure "le_emit_defs_" set ref 104* 114 library 106 based bit(1) array level 4 in structure "lec" packed unaligned dcl 56 in procedure "le_emit_defs_" ref 104 link_ref 000113 automatic bit(1) unaligned dcl 77 set ref 205* 207* 209* 211 modifier 000114 automatic bit(6) unaligned dcl 78 set ref 231* 234* n_defs based fixed bin(17,0) level 3 dcl 63 ref 110 141 n_segnames based fixed bin(17,0) level 3 dcl 59 ref 134 name 10 based varying char(32) array level 3 dcl 56 set ref 242* new 143 based structure array level 3 dcl 56 new_offset 104(18) based fixed bin(18,0) array level 3 packed unsigned unaligned dcl 63 set ref 169* 178* 187* 219* 238* new_relp 000115 automatic fixed bin(18,0) unsigned dcl 79 set ref 231* 234* 234 238* no_link 105(04) based bit(1) array level 4 packed unaligned dcl 63 set ref 116* null builtin function dcl 89 ref 234 234 ocu_$emit_definition 000016 constant entry external dcl 2-90 ref 169 178 187 219 238 ocu_$emit_link 000022 constant entry external dcl 2-115 ref 234 ocu_$emit_segname 000020 constant entry external dcl 2-98 ref 135 ocudp parameter pointer dcl 37 set ref 15 135* 169* 178* 187* 219* 231* 234* 238* offset 104 based fixed bin(18,0) array level 3 packed unsigned unaligned dcl 63 set ref 231 242* orig 116 based structure array level 3 dcl 56 referenced 105(03) based bit(1) array level 4 packed unaligned dcl 63 ref 114 rel_stat 144 based fixed bin(18,0) array level 4 packed unsigned unaligned dcl 56 ref 101 rel_symb 143(18) based fixed bin(18,0) array level 4 packed unsigned unaligned dcl 56 ref 102 rel_text 143 based fixed bin(18,0) array level 4 packed unsigned unaligned dcl 56 ref 100 relp 12 based fixed bin(18,0) array level 3 in structure "les" packed unsigned unaligned dcl 59 in procedure "le_emit_defs_" set ref 135* relp 000116 automatic fixed bin(18,0) unsigned dcl 80 in procedure "le_emit_defs_" set ref 166* 169* 177* 178* 186* 187* 218* 219* 231* relp 103(18) based fixed bin(18,0) array level 3 in structure "led" packed unsigned unaligned dcl 63 in procedure "le_emit_defs_" ref 166 177 186 207 218 retain 105(05) based bit(1) array level 4 packed unaligned dcl 63 set ref 116* 122 rtrim builtin function dcl 90 ref 135 135 section 000117 automatic fixed bin(3,0) dcl 81 set ref 231* 234 234* segname 1 based structure array level 2 in structure "le_segnames" dcl 1-149 in procedure "le_emit_defs_" segname 1 based structure array level 2 in structure "les" dcl 59 in procedure "le_emit_defs_" separate_static 106(03) based bit(1) array level 4 packed unaligned dcl 56 ref 205 stat_relp 000120 automatic fixed bin(18,0) unsigned dcl 82 set ref 101* 186 218 str 1 based varying char(32) array level 3 in structure "les" dcl 59 in procedure "le_emit_defs_" ref 135 135 str 2 based varying char(256) array level 3 in structure "led" dcl 63 in procedure "le_emit_defs_" set ref 169* 178* 187* 219* 238* symb_relp 000121 automatic fixed bin(18,0) unsigned dcl 83 set ref 102* 177 tables 110 based structure array level 3 dcl 56 text_relp 000122 automatic fixed bin(18,0) unsigned dcl 84 set ref 100* 166 true constant bit(1) initial unaligned dcl 31 ref 106 117 205 207 type 000123 automatic fixed bin(17,0) dcl 85 in procedure "le_emit_defs_" set ref 156* 160 172 181 190 type 103 based fixed bin(18,0) array level 3 in structure "led" packed unsigned unaligned dcl 63 in procedure "le_emit_defs_" ref 156 NAMES DECLARED BY DECLARE STATEMENT AND NEVER REFERENCED. DEFINITION_FLAGS_INDIRECT internal static bit(4) initial unaligned dcl 2-40 Heap internal static fixed bin(3,0) initial dcl 1-38 LE_ABORT_ERROR internal static fixed bin(17,0) initial dcl 1-22 LE_ERROR internal static fixed bin(17,0) initial dcl 1-20 LE_WARNING internal static fixed bin(17,0) initial dcl 1-19 OPEN_FLAGS_BOUND internal static bit(6) initial unaligned dcl 2-20 OPEN_FLAGS_NO_HASHTABLE internal static bit(6) initial unaligned dcl 2-32 OPEN_FLAGS_PERPROCESS_STATIC internal static bit(6) initial unaligned dcl 2-29 OPEN_FLAGS_PROCEDURE internal static bit(6) initial unaligned dcl 2-24 OPEN_FLAGS_RELOCATABLE internal static bit(6) initial unaligned dcl 2-22 OPEN_FLAGS_SEPARATE_STATIC internal static bit(6) initial unaligned dcl 2-26 Patch_Init internal static fixed bin(17,0) initial dcl 1-59 Patch_Link internal static fixed bin(17,0) initial dcl 1-58 Patch_Self_Init internal static fixed bin(17,0) initial dcl 1-61 Patch_Symbol_Ref internal static fixed bin(17,0) initial dcl 1-60 Refname_Base internal static fixed bin(3,0) initial dcl 1-49 Refname_Offsetname internal static fixed bin(3,0) initial dcl 1-51 Self_Offsetname internal static fixed bin(3,0) initial dcl 1-53 System internal static fixed bin(3,0) initial dcl 1-36 component_count automatic fixed bin(15,0) unsigned dcl 2-56 component_list based pointer array dcl 2-58 component_listp automatic pointer dcl 2-55 def_count automatic fixed bin(17,0) dcl 1-173 gen_info based structure level 1 dcl 2-61 le_binaries based structure level 1 dcl 1-260 le_links based structure level 1 dcl 1-225 le_options based structure level 1 dcl 1-202 le_patches based structure level 1 dcl 1-293 link_count automatic fixed bin(17,0) dcl 1-231 ocu_$backpatch 000000 constant entry external dcl 2-146 ocu_$close 000000 constant entry external dcl 2-76 ocu_$create_msf 000000 constant entry external dcl 2-153 ocu_$emit_firstref_trap 000000 constant entry external dcl 2-134 ocu_$emit_msf_map 000000 constant entry external dcl 2-104 ocu_$emit_partial_link 000000 constant entry external dcl 2-126 ocu_$emit_static 000000 constant entry external dcl 2-109 ocu_$emit_symbol 000000 constant entry external dcl 2-139 ocu_$emit_text 000000 constant entry external dcl 2-83 ocu_$open 000000 constant entry external dcl 2-69 ocu_$release 000000 constant entry external dcl 2-80 reloc_str based char unaligned dcl 2-53 reloc_strl automatic fixed bin(21,0) dcl 2-51 reloc_strp automatic pointer dcl 2-50 section_nm internal static char(16) initial array unaligned dcl 1-41 segname_count automatic fixed bin(17,0) dcl 1-156 word_array based bit(36) array unaligned dcl 2-48 word_arrayl automatic fixed bin(18,0) unsigned dcl 2-46 word_arrayp automatic pointer dcl 2-45 NAME DECLARED BY EXPLICIT CONTEXT. le_emit_defs_ 000037 constant entry external dcl 15 THERE WERE NO NAMES DECLARED BY CONTEXT OR IMPLICATION. STORAGE REQUIREMENTS FOR THIS PROGRAM. Object Text Link Symbol Defs Static Start 0 0 1204 1230 1101 1214 Length 1452 1101 24 206 102 0 BLOCK NAME STACK SIZE TYPE WHY NONQUICK/WHO SHARES STACK FRAME le_emit_defs_ 176 external procedure is an external procedure. STORAGE FOR AUTOMATIC VARIABLES. STACK FRAME LOC IDENTIFIER BLOCK NAME le_emit_defs_ 000100 chase le_emit_defs_ 000101 flags le_emit_defs_ 000102 ignore_block le_emit_defs_ 000103 internal le_emit_defs_ 000104 ledp le_emit_defs_ 000106 lelp le_emit_defs_ 000110 lesp le_emit_defs_ 000112 library le_emit_defs_ 000113 link_ref le_emit_defs_ 000114 modifier le_emit_defs_ 000115 new_relp le_emit_defs_ 000116 relp le_emit_defs_ 000117 section le_emit_defs_ 000120 stat_relp le_emit_defs_ 000121 symb_relp le_emit_defs_ 000122 text_relp le_emit_defs_ 000123 type le_emit_defs_ THE FOLLOWING EXTERNAL OPERATORS ARE USED BY THIS PROGRAM. alloc_char_temp call_ext_out_desc call_ext_out return_mac shorten_stack ext_entry THE FOLLOWING EXTERNAL ENTRIES ARE CALLED BY THIS PROGRAM. le_error_ le_snap_ ocu_$emit_definition ocu_$emit_link ocu_$emit_segname THE FOLLOWING EXTERNAL VARIABLES ARE USED BY THIS PROGRAM. error_table_$bad_class_def LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC 15 000033 94 000044 95 000053 96 000055 100 000057 101 000063 102 000066 104 000071 106 000074 110 000076 114 000107 116 000117 117 000131 122 000133 124 000143 128 000145 130 000152 134 000154 135 000163 137 000254 141 000257 145 000267 151 000313 153 000322 154 000324 156 000332 160 000335 166 000336 167 000342 169 000347 171 000412 172 000413 177 000415 178 000421 180 000464 181 000465 186 000467 187 000473 189 000536 190 000537 205 000541 207 000555 209 000570 211 000571 218 000573 219 000600 221 000642 231 000643 234 000702 238 000762 241 001027 242 001030 246 001075 248 001077 ----------------------------------------------------------- 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