6 // see pl1/linkdcl.incl.pl1
8 // dcl 1 link based aligned, /* link pair in linkage section */
10 // 2 head_ptr bit (18) unal, /* rel pointer to beginning of linkage section */
11 // 2 ringno bit (3) unal,
12 // 2 mbz bit (6) unal,
13 // 2 run_depth fixed bin (2) unal, /* run unit depth, filled when link is snapped */
14 // 2 ft2 bit (6) unal, /* fault tag. 46(8) if not snapped, 43(8) if snapped */
16 int64_t run_depth : 3;
19 uint64_t head_ptr : 18;
22 // 2 exp_ptr bit (18) unal, /* pointer (rel to defs) of expression word */
23 // 2 mbz2 bit (12) unal,
24 // 2 modifier bit (6) unal; /* modifier to be left in snapped link */
25 uint64_t modifier : 6;
27 uint64_t exp_ptr : 18;
31 #if 0 // avoid conflict with definition_dcls.h
32 // dcl 1 exp_word based aligned, /* expression word in link definition */
34 // 2 type_ptr bit (18) unal, /* pointer (rel to defs) of type pair structure */
35 // 2 exp bit (18) unal; /* constant expression to be added in when snapping link */
37 uint64_t type_ptr : 18;
41 // dcl 1 type_pair based aligned, /* type pair in link definition */
43 // 2 type bit (18) unal, /* type of link. may be 1,2,3,4,5, or 6 */
44 // 2 trap_ptr bit (18) unal, /* pointer (rel to defs) to the trap word */
45 uint64_t trap_ptr : 18;
49 // 2 seg_ptr bit (18) unal, /* pointer to ACC reference name for segment referenced */
50 // 2 ext_ptr bit (18) unal; /* pointer (rel to defs) of ACC segdef name */
51 uint64_t ext_ptr : 18;
52 uint64_t seg_ptr : 18;
57 // dcl 1 header based aligned, /* linkage block header */
58 struct linkage_header {
59 // 2 def_ptr ptr, /* pointer to definition section */
60 struct its_pointer def_ptr;
62 // 2 symbol_ptr ptr unal, /* pointer to symbol section in object segment */
63 struct packed_pointer symbol_ptr;
65 // 2 original_linkage_ptr
66 // ptr unal, /* pointer to linkage section in object segment */
67 struct packed_pointer original_linkage_ptr;
73 // 3 begin_links bit (18) unal, /* offset (rel to this section) of first link */
74 // 3 block_length bit (18) unal, /* number of words in this linkage section */
75 uint64_t stats_block_length : 18;
76 uint64_t stats_begin_links : 18;
80 // bit (18) unal, /* text segment number associated with this section */
81 // 3 static_length bit (18) unal; /* number of words of static for this segment */
82 uint64_t stats_static_length : 18;
83 uint64_t stats_segment_number : 18;
87 // dcl 1 linkage_header_flags
88 // aligned based, /* overlay of def_ptr for flags */
89 struct linkage_header_flags {
90 // 2 pad1 bit (28) unaligned, /* flags are in first word */
91 // 2 static_vlas bit (1) unaligned, /* static section "owns" some LA/VLA segments */
92 // 2 perprocess_static
93 // bit (1) unaligned, /* 1 copy of static section is used by all tasks/run units */
94 // 2 pad2 bit (6) unaligned;
96 uint64_t perprocess_static : 1;
97 uint64_t static_vlas : 1;
102 // dcl 1 virgin_linkage_header
103 // aligned based, /* template for linkage header in object segment */
104 struct virgin_linkage_header {
105 // 2 pad bit (30) unaligned, /* is filled in by linker */
106 // 2 defs_in_link bit (6) unaligned, /* =o20 if defs in linkage (nonstandard) */
107 uint64_t defs_in_link : 6;
109 uint64_t dummy0 : 28;
111 // 2 def_offset bit (18) unaligned, /* offset of definition section */
112 // 2 first_ref_relp bit (18) unaligned, /* offset of trap-at-first-reference offset array */
113 uint64_t first_ref_relp : 18;
114 uint64_t def_offset : 18;
115 uint64_t dummy1 : 28;
117 // 2 filled_in_later bit (144),
118 uint64_t filled_in_later[4];
120 // 2 link_begin bit (18) unaligned, /* offset of first link */
121 // 2 linkage_section_lng
122 // bit (18) unaligned, /* length of linkage section */
123 uint64_t linkage_section_lng : 18;
124 uint64_t link_begin : 18;
125 uint64_t dummy2 : 28;
127 // 2 segno_pad bit (18) unaligned, /* will be segment number of copied linkage */
128 // 2 static_length bit (18) unaligned; /* length of static section */
129 uint64_t static_length : 18;
130 uint64_t segno_pad : 18;
131 uint64_t dummy3 : 28;
134 // dcl 1 trap_word based aligned, /* trap word in link definition */
136 // 2 call_ptr bit (18) unal, /* pointer (rel to link) of link to trap procedure */
137 // 2 arg_ptr bit (18) unal; /* pointer (rel to link) of link to arg info for trap proc */
138 uint64_t arg_ptr : 18;
139 uint64_t call_ptr : 18;
140 uint64_t dummy0 : 28;
143 // dcl 1 name based aligned, /* storage of ASCII names in definitions */
144 // 2 nchars bit (9) unaligned, /* number of characters in name */
145 // 2 char_string char (31) unaligned; /* 31-character name */