COMPILATION LISTING OF SEGMENT get_bound_seg_info_ Compiled by: Multics PL/I Compiler, Release 33e, of October 6, 1992 Compiled at: CGI Compiled on: 2000-05-05_1831.25_Fri_mdt Options: optimize map 1 /* *********************************************************** 2* * * 3* * Copyright, (C) Honeywell Information Systems Inc., 1982 * 4* * * 5* * Copyright (c) 1972 by Massachusetts Institute of * 6* * Technology and Honeywell Information Systems, Inc. * 7* * * 8* *********************************************************** */ 9 10 11 get_bound_seg_info_: proc (objp, bitcount, oip, bmp, sblkp, code); 12 13 /* 14* This procedure looks through the defs of an object segment to find the bindmap. 15* 16* Modified: 17 July 1981 by Jeff Ives to use decode_definition_$full which has no memory between calls 17**/ 18 19 declare (objp, oip, bmp, sblkp) pointer; 20 declare bitcount fixed bin (24); 21 declare code fixed bin (35); 22 23 declare (error_table_$not_bound, error_table_$bad_segment, error_table_$oldobj, error_table_$unimplemented_version) ext fixed bin (35); 24 declare (addr, addrel, null, substr, unspec) builtin; 25 declare eof bit aligned; 26 declare decode_definition_$full entry (pointer, pointer, pointer, bit aligned); 27 declare object_info_$display external entry (pointer, fixed bin (24), pointer, fixed bin (35)); 28 29 30 declare 1 dd aligned, /* structure filled in by full entry */ 31 2 next_def ptr, /* ptr to next definition in list */ 32 2 last_def ptr, /* ptr to previous definition in list */ 33 2 block_ptr ptr, /* ptr to either defblock or segname block */ 34 2 section char (4) aligned, /* "text", "link", "symb" or "segn" */ 35 2 offset fixed bin, /* offset within class (if ^= "segn") */ 36 2 entrypoint fixed bin, /* value of entrypoint in text if ^= 0 */ 37 2 symbol char (256) aligned,/* the symbolic name of the definition */ 38 2 symbol_lng fixed bin, /* the actual length of symbol */ 39 2 flags, /* same flags as in std def */ 40 3 a_new_format bit (1) unaligned, /* def is in new format */ 41 3 a_ignore bit (1) unaligned, /* linker should ignore this def */ 42 3 a_entrypoint bit (1) unaligned, /* def is for entrypoint */ 43 3 a_retain bit (1) unaligned, 44 3 a_arg_count bit (1) unaligned, /* there is an arg count for entry */ 45 3 a_descr_sw bit (1) unaligned, /* there are valid descriptors for entry */ 46 3 unused bit (12) unaligned, 47 2 n_args fixed bin, /* # of args entry expects */ 48 2 descr_ptr ptr; /* ptr to array of rel ptrs to descriptors for entry */ 49 50 /* */ 51 declare 1 oi aligned based (oip) like object_info; 52 1 1 /* BEGIN INCLUDE FILE ... object_info.incl.pl1 1 2*coded February 8, 1972 by Michael J. Spier */ 1 3 /* modified May 26, 1972 by M. Weaver */ 1 4 /* modified 15 April, 1975 by M. Weaver */ 1 5 1 6 declare 1 object_info aligned based, /* structure containing object info based, returned by object_info_ */ 1 7 2 version_number fixed bin, /* version number of current structure format (=2) */ 1 8 2 textp pointer, /* pointer to beginning of text section */ 1 9 2 defp pointer, /* pointer to beginning of definition section */ 1 10 2 linkp pointer, /* pointer to beginning of linkage section */ 1 11 2 statp pointer, /* pointer to beginning of static section */ 1 12 2 symbp pointer, /* pointer to beginning of symbol section */ 1 13 2 bmapp pointer, /* pointer to beginning of break map (may be null) */ 1 14 2 tlng fixed bin, /* length in words of text section */ 1 15 2 dlng fixed bin, /* length in words of definition section */ 1 16 2 llng fixed bin, /* length in words of linkage section */ 1 17 2 ilng fixed bin, /* length in words of static section */ 1 18 2 slng fixed bin, /* length in words of symbol section */ 1 19 2 blng fixed bin, /* length in words of break map */ 1 20 2 format, /* word containing bit flags about object type */ 1 21 3 old_format bit(1) unaligned, /* on if segment isn't in new format, i.e. has old style object map */ 1 22 3 bound bit(1) unaligned, /* on if segment is bound */ 1 23 3 relocatable bit(1) unaligned, /* on if seg has relocation info in its first symbol block */ 1 24 3 procedure bit(1) unaligned, /* on if segment is an executable object program */ 1 25 3 standard bit(1) unaligned, /* on if seg is in standard format (more than just standard map) */ 1 26 3 gate bit(1) unaligned, /* on if segment is a gate */ 1 27 3 separate_static bit(1) unaligned, /* on if static not in linkage */ 1 28 3 links_in_text bit(1) unaligned, /* on if there are threaded links in text */ 1 29 3 perprocess_static bit (1) unaligned, /* on if static is not to be per run unit */ 1 30 3 pad bit(27) unaligned, 1 31 2 entry_bound fixed bin, /* entry bound if segment is a gate */ 1 32 2 textlinkp pointer, /* ptr to first link in text */ 1 33 1 34 /* LIMIT OF BRIEF STRUCTURE */ 1 35 1 36 2 compiler char(8) aligned, /* name of processor which generated segment */ 1 37 2 compile_time fixed bin(71), /* clock reading of date/time object was generated */ 1 38 2 userid char(32) aligned, /* standard Multics id of creator of object segment */ 1 39 2 cvers aligned, /* generator version name in printable char string form */ 1 40 3 offset bit(18) unaligned, /* offset of name in words relative to base of symbol section */ 1 41 3 length bit(18) unaligned, /* length of name in characters */ 1 42 2 comment aligned, /* printable comment concerning generator or generation of segment */ 1 43 3 offset bit(18) unaligned, /* offset of comment in words relative to base of symbol section */ 1 44 3 length bit(18) unaligned, /* length of comment in characters */ 1 45 2 source_map fixed bin, /* offset, relative to base of symbol section, of source map structure */ 1 46 1 47 /* LIMIT OF DISPLAY STRUCTURE */ 1 48 1 49 2 rel_text pointer, /* pointer to text section relocation info */ 1 50 2 rel_def pointer, /* pointer to definition section relocation info */ 1 51 2 rel_link pointer, /* pointer to linkage section relocation info */ 1 52 2 rel_static pointer, /* pointer to static section relocation info */ 1 53 2 rel_symbol pointer, /* pointer to symbol section relocation info */ 1 54 2 text_boundary fixed bin, /* specifies mod of text section base boundary */ 1 55 2 static_boundary fixed bin, /* specifies mod of internal static base boundary */ 1 56 /* currently not used by system */ 1 57 2 default_truncate fixed bin, /* offset rel to symbp for binder to automatically trunc. symb sect. */ 1 58 2 optional_truncate fixed bin; /* offset rel to symbp for binder to optionally trunc. symb sect. */ 1 59 1 60 declare object_info_version_2 fixed bin int static init(2); 1 61 1 62 /* END INCLUDE FILE ... object_info.incl.pl1 */ 53 54 55 /* */ 56 2 1 /* BEGIN INCLUDE SEGMENT ... symbol_block.incl.pl1 2 2*coded February 8, 1972 by Michael J. Spier */ 2 3 2 4 /* last modified may 3, 1972 by M. Weaver */ 2 5 2 6 declare 1 sb aligned based(sblkp), /* structure describing a standard symbol block */ 2 7 2 decl_vers fixed bin, /* version number of current structure format */ 2 8 2 identifier char(8) aligned, /* symbolic code to define purpose of this symb block */ 2 9 2 gen_version_number fixed bin, /* positive integer designating version of object generator */ 2 10 2 gen_creation_time fixed bin(71), /* clock reading of date/time generator was created */ 2 11 2 obj_creation_time fixed bin(71), /* clock reading of date/time object was generated */ 2 12 2 generator char(8) aligned, /* name of processor which generated segment */ 2 13 2 gen_name_offset bit(18) unaligned, /* offset of generator name in words rel to base of symbol block */ 2 14 2 gen_name_length bit(18) unaligned, /* length of printable generator version name in characters */ 2 15 2 uid_offset bit(18) unaligned, /* offset of creator id in words rel to base of symbol block */ 2 16 2 uid_length bit(18) unaligned, /* length of standard Multics id of object creator in characters */ 2 17 2 comment_offset bit(18) unaligned, /* offset of comment in words relative to base of symbol block */ 2 18 2 comment_length bit(18) unaligned, /* length of printable generator comment in characters */ 2 19 2 tbound bit(18) unaligned, /* specifies mod of text section base boundary */ 2 20 2 stat_bound bit(18) unaligned, /* specifies mod of internal static base boundary */ 2 21 2 source_map bit(18) unaligned, /* offset relative to base of symbol block of source map structure */ 2 22 2 area_ptr bit(18) unaligned, /* offset of block info in words relative to base of symbol block */ 2 23 2 symb_base bit(18) unaligned, /* back pointer (rel to base of symb block) to base of symb section */ 2 24 2 block_size bit(18) unaligned, /* size in words of entire symbol block */ 2 25 2 next_block bit(18) unaligned, /* if ^= "0"b, is thread (rel to base of symb section) to next symb block */ 2 26 2 rel_text bit(18) unaligned, /* offset rel to base of symbol block of text sect relocation info */ 2 27 2 rel_def bit(18) unaligned, /* offset rel to base of symb block of def section relocation info */ 2 28 2 rel_link bit(18) unaligned, /* offset rel to base of symb block of link sect relocation info */ 2 29 2 rel_symb bit(18) unaligned, /* offset rel to base of symb block of symb sect relocation info */ 2 30 2 default_truncate bit(18) unaligned, /* offset RTBOSB for binder to automatically trunc. symb sect. */ 2 31 2 optional_truncate bit(18) unaligned; /* offset RTBOSB for binder to optionally truncate symb section */ 2 32 2 33 /* END INCLUDE SEGMENT ... symbol_block.incl.pl1 */ 57 58 59 /* */ 60 3 1 /* BEGIN INCLUDE SEGMENT ... symbol_block_header.incl.pl1 */ 3 2 3 3 /* Declaration of obsolete symbol block temporarily 3 4* generated by the binder */ 3 5 3 6 declare 1 symblk_head aligned based(sblkp), 3 7 3 8 2 block_id char(8) aligned, /* identifier of this symbol block */ 3 9 2 dcl_version fixed bin, /* version number of this structure = 1 */ 3 10 2 comp_version_number fixed bin, /* generator's version number */ 3 11 2 comp_creation_time fixed bin(71), /* compiler creation time (compatible with old symb table) */ 3 12 2 object_creation_time fixed bin(71), /* clock reading (compatible with old symb table) */ 3 13 2 comp_id char(8) aligned, /* identifier of object generator */ 3 14 2 comp_version_name, 3 15 3 name_ptr bit(18) unaligned, /* pointer to string */ 3 16 3 name_lng bit(18) unaligned, /* length of string */ 3 17 2 userid, 3 18 3 id_ptr bit(18) unaligned, /* pointer to userid string */ 3 19 3 id_lng bit(18) unaligned, /* lng of userid string */ 3 20 2 comment, 3 21 3 com_ptr bit(18) unaligned, /* pointer to comment string */ 3 22 3 com_lng bit(18) unaligned, /* length of comment string */ 3 23 2 source_map_ptr bit(18) unaligned, /* pointer to array of sourcefile specifiers */ 3 24 2 source_map_size bit(18) unaligned, /* dimension of source map */ 3 25 2 block_ptr bit(18) unaligned, /* pointer to beginning of symbol block */ 3 26 2 section_base bit(18) unaligned, /* backpointer to symbol section base */ 3 27 2 block_size bit(18) unaligned, /* size of symbol block (incl header) */ 3 28 2 next_block bit(18) unaligned, /* thread to next symbol block */ 3 29 2 rel_text bit(18) unaligned, /* pointer to text relocation bits */ 3 30 2 rel_link bit(18) unaligned, /* pointer to linkage relocation bits */ 3 31 2 rel_symbol bit(18) unaligned, /* pointer to symbol relocation bits */ 3 32 2 mini_truncate bit(18) unaligned, /* minimum truncate value */ 3 33 2 maxi_truncate bit(18) unaligned; /* maximum truncate value */ 3 34 3 35 /* END INCLUDE SEGMENT ... symbol_block_header.incl.pl1 */ 61 62 63 /* */ 64 bmp, sblkp = null (); /* initialize */ 65 66 /* ASSUME THE USER HAS ALREADY SET THE VERSION NUMBER */ 67 call object_info_$display (objp, bitcount, oip, code); /* get basic object info (for caller too) */ 68 if code ^= 0 then return; /* couldn't find bind map if there was one */ 69 70 if oi.version_number = object_info_version_2 then do; /* have new structure */ 71 if ^oi.format.standard then if ^oi.format.old_format then do; 72 code = error_table_$bad_segment; /* have non-standard new format seg; don't process */ 73 return; 74 end; 75 76 unspec (dd) = ""b; /* safety first! */ 77 dd.next_def = oi.defp; /* initialize definition lookup */ 78 79 lookup_defs: 80 call decode_definition_$full ((dd.next_def), addr (dd), addr (oi), eof); 81 82 if eof then do; /* have looked at all the definitions */ 83 if oi.compiler = "binder " then code = error_table_$oldobj; /* bound but has no bindmap */ 84 else code = error_table_$not_bound; /* assume anything not generated by binder is not bound */ 85 return; 86 end; 87 88 if dd.flags.a_ignore 89 then go to lookup_defs; 90 91 if substr (dd.symbol, 1, dd.symbol_lng) = "bind_map" then if dd.section = "symb" then do; /* should have real bindmap */ 92 sblkp = addrel (oi.symbp, dd.offset); /* get ptr to binder's symbol block */ 93 if oi.format.standard then bmp = addrel (sblkp, sb.area_ptr); 94 else bmp = addrel (sblkp, symblk_head.block_ptr); 95 return; 96 end; 97 98 goto lookup_defs; /* get next definition */ 99 end; 100 else code = error_table_$unimplemented_version; 101 102 end get_bound_seg_info_; SOURCE FILES USED IN THIS COMPILATION. LINE NUMBER DATE MODIFIED NAME PATHNAME 0 05/05/00 1831.2 get_bound_seg_info_.pl1 >udd>sm>ds>w>ml>get_bound_seg_info_.pl1 53 1 08/05/77 1122.5 object_info.incl.pl1 >ldd>incl>object_info.incl.pl1 57 2 05/06/74 1852.6 symbol_block.incl.pl1 >ldd>incl>symbol_block.incl.pl1 61 3 05/06/74 1852.6 symbol_block_header.incl.pl1 >ldd>incl>symbol_block_header.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. a_ignore 112(01) 000102 automatic bit(1) level 3 packed packed unaligned dcl 30 set ref 88 addr builtin function dcl 24 ref 79 79 79 79 addrel builtin function dcl 24 ref 92 93 94 area_ptr 16(18) based bit(18) level 2 packed packed unaligned dcl 2-6 ref 93 bitcount parameter fixed bin(24,0) dcl 20 set ref 11 67* block_ptr 16 based bit(18) level 2 packed packed unaligned dcl 3-6 ref 94 bmp parameter pointer dcl 19 set ref 11 64* 93* 94* code parameter fixed bin(35,0) dcl 21 set ref 11 67* 68 72* 83* 84* 100* compiler 30 based char(8) level 2 dcl 51 set ref 83 dd 000102 automatic structure level 1 dcl 30 set ref 76* 79 79 decode_definition_$full 000020 constant entry external dcl 26 ref 79 defp 4 based pointer level 2 dcl 51 set ref 77 eof 000100 automatic bit(1) dcl 25 set ref 79* 82 error_table_$bad_segment 000012 external static fixed bin(35,0) dcl 23 ref 72 error_table_$not_bound 000010 external static fixed bin(35,0) dcl 23 ref 84 error_table_$oldobj 000014 external static fixed bin(35,0) dcl 23 ref 83 error_table_$unimplemented_version 000016 external static fixed bin(35,0) dcl 23 ref 100 flags 112 000102 automatic structure level 2 dcl 30 format 24 based structure level 2 dcl 51 next_def 000102 automatic pointer level 2 dcl 30 set ref 77* 79 null builtin function dcl 24 ref 64 object_info based structure level 1 dcl 1-6 object_info_$display 000022 constant entry external dcl 27 ref 67 object_info_version_2 constant fixed bin(17,0) initial dcl 1-60 ref 70 objp parameter pointer dcl 19 set ref 11 67* offset 7 000102 automatic fixed bin(17,0) level 2 dcl 30 set ref 92 oi based structure level 1 dcl 51 set ref 79 79 oip parameter pointer dcl 19 set ref 11 67* 70 71 71 77 79 79 83 92 93 old_format 24 based bit(1) level 3 packed packed unaligned dcl 51 set ref 71 sb based structure level 1 dcl 2-6 sblkp parameter pointer dcl 19 set ref 11 64* 92* 93 93 94 94 section 6 000102 automatic char(4) level 2 dcl 30 set ref 91 standard 24(04) based bit(1) level 3 packed packed unaligned dcl 51 set ref 71 93 substr builtin function dcl 24 ref 91 symblk_head based structure level 1 dcl 3-6 symbol 11 000102 automatic char(256) level 2 dcl 30 set ref 91 symbol_lng 111 000102 automatic fixed bin(17,0) level 2 dcl 30 set ref 91 symbp 12 based pointer level 2 dcl 51 set ref 92 unspec builtin function dcl 24 set ref 76* version_number based fixed bin(17,0) level 2 dcl 51 set ref 70 NAMES DECLARED BY EXPLICIT CONTEXT. get_bound_seg_info_ 000020 constant entry external dcl 11 lookup_defs 000074 constant label dcl 79 ref 88 98 THERE WERE NO NAMES DECLARED BY CONTEXT OR IMPLICATION. STORAGE REQUIREMENTS FOR THIS PROGRAM. Object Text Link Symbol Defs Static Start 0 0 322 346 212 332 Length 570 212 24 206 107 0 BLOCK NAME STACK SIZE TYPE WHY NONQUICK/WHO SHARES STACK FRAME get_bound_seg_info_ 160 external procedure is an external procedure. STORAGE FOR AUTOMATIC VARIABLES. STACK FRAME LOC IDENTIFIER BLOCK NAME get_bound_seg_info_ 000100 eof get_bound_seg_info_ 000102 dd get_bound_seg_info_ THE FOLLOWING EXTERNAL OPERATORS ARE USED BY THIS PROGRAM. call_ext_out return_mac ext_entry THE FOLLOWING EXTERNAL ENTRIES ARE CALLED BY THIS PROGRAM. decode_definition_$full object_info_$display THE FOLLOWING EXTERNAL VARIABLES ARE USED BY THIS PROGRAM. error_table_$bad_segment error_table_$not_bound error_table_$oldobj error_table_$unimplemented_version LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC 11 000012 64 000025 67 000031 68 000045 70 000050 71 000054 72 000063 73 000066 76 000067 77 000072 79 000074 82 000121 83 000124 84 000137 85 000142 88 000143 91 000146 92 000156 93 000165 94 000200 95 000204 98 000205 100 000206 102 000211 ----------------------------------------------------------- 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