1 /****  START OF:    le_data.incl.pl1                         *  *  *  *  *  */
  2 
  3 /****^  HISTORY COMMENTS:
  4   1) change(86-08-12,Elhard), approve(86-08-12,MCR7505),
  5      audit(86-12-10,DGHowe), install(86-12-10,MR12.0-1241):
  6      Originally written to define the structures used internally by le_.
  7                                                    END HISTORY COMMENTS */
  8 
  9   /*** ****************************************************************/
 10   /***                                                                */
 11   /***    Name:     le_data                                           */
 12   /***    Function: This include file defines the data structures     */
 13   /***              used internally by the linkage_editor subroutine. */
 14   /***                                                                */
 15   /*** ****************************************************************/
 16 
 17   /* error severity constants */
 18 
 19   dcl LE_WARNING              fixed bin static options (constant) init (1);
 20   dcl LE_ERROR                fixed bin static options (constant) init (2);
 21   dcl LE_FATAL_ERROR          fixed bin static options (constant) init (3);
 22   dcl LE_ABORT_ERROR          fixed bin static options (constant) init (4);
 23 
 24   /* section identifier constants */
 25 
 26   dcl Text                    fixed bin (3) static options (constant)
 27                               init (0);
 28   dcl Linkage                 fixed bin (3) static options (constant)
 29                               init (1);
 30   dcl Symbol                  fixed bin (3) static options (constant)
 31                               init (2);
 32   dcl Definition              fixed bin (3) static options (constant)
 33                               init (3);
 34   dcl Static                  fixed bin (3) static options (constant)
 35                               init (4);
 36   dcl System                  fixed bin (3) static options (constant)
 37                               init (5);
 38   dcl Heap                    fixed bin (3) static options (constant)
 39                               init (6);
 40 
 41   dcl section_nm              (0:6) char (16) static options (constant)
 42                               init ("text", "linkage", "symbol", "definition",
 43                               "static", "system", "heap");
 44 
 45   /* link type constants */
 46 
 47   dcl Self_Base               fixed bin (3) static options (constant)
 48                               init (1);
 49   dcl Refname_Base            fixed bin (3) static options (constant)
 50                               init (3);
 51   dcl Refname_Offsetname      fixed bin (3) static options (constant)
 52                               init (4);
 53   dcl Self_Offsetname         fixed bin (3) static options (constant)
 54                               init (5);
 55 
 56   /* backpatch type constants */
 57 
 58   dcl Patch_Link              fixed bin static options (constant) init (1);
 59   dcl Patch_Init              fixed bin static options (constant) init (2);
 60   dcl Patch_Symbol_Ref        fixed bin static options (constant) init (3);
 61   dcl Patch_Self_Init         fixed bin static options (constant) init (4);
 62 
 63   /*** ****************************************************************/
 64   /***                                                                */
 65   /***    Name:     le_components                                     */
 66   /***    Function: the component table is used to keep information   */
 67   /***              about the input components being used and their   */
 68   /***              disposition in output components.                 */
 69   /***                                                                */
 70   /*** ****************************************************************/
 71 
 72   dcl 01 le_components        aligned based,
 73        02 header              aligned,
 74         03 flags              aligned,
 75          04 separate_static   bit (1) unaligned,
 76          04 perprocess_static bit (1) unaligned,
 77          04 mbz               bit (34) unaligned,
 78         03 n_components       fixed bin,
 79        02 comp                (0 refer (le_components.n_components))
 80                               like le_comp;
 81 
 82   /*** ****************************************************************/
 83   /***                                                                */
 84   /***    Name:     le_comp                                           */
 85   /***    Function: this is a single component table entry.           */
 86   /***                                                                */
 87   /*** ****************************************************************/
 88 
 89   dcl 01 le_comp              aligned based,
 90        02 segp                ptr,
 91        02 bc                  fixed bin (24),
 92        02 uid                 bit (36) aligned,
 93        02 dtcm                fixed bin (71),
 94        02 name                char (32) varying,
 95        02 path                char (194) varying,
 96        02 compiler            char (8),
 97        02 target              fixed bin,
 98        02 flags               aligned,
 99         03 library            bit (1) unaligned,
100         03 include            bit (1) unaligned,
101         03 delete_table       bit (1) unaligned,
102         03 separate_static    bit (1) unaligned,
103         03 io_table           bit (1) unaligned,
104         03 unique_path        bit (1) unaligned,
105         03 mbz                bit (30) unaligned,
106        02 tables              aligned,
107         03 lesp               ptr,
108         03 ledp               ptr,
109         03 lelp               ptr,
110        02 orig                aligned,
111         03 textp              ptr,
112         03 defnp              ptr,
113         03 linkp              ptr,
114         03 statp              ptr,
115         03 symbp              ptr,
116         03 rel_textp          ptr,
117         03 rel_symbp          ptr,
118         03 rel_linkp          ptr,
119         03 textl              fixed bin (18) unsigned unaligned,
120         03 defnl              fixed bin (18) unsigned unaligned,
121         03 linkl              fixed bin (18) unsigned unaligned,
122         03 statl              fixed bin (18) unsigned unaligned,
123         03 symbl              fixed bin (18) unsigned unaligned,
124         03 symbl_no_rel       fixed bin (18) unsigned unaligned,
125         03 symbl_no_table     fixed bin (18) unsigned unaligned,
126         03 n_symb_blocks      fixed bin (18) unsigned unaligned,
127         03 text_boundary      fixed bin (9) unsigned unaligned,
128         03 static_boundary    fixed bin (9) unsigned unaligned,
129         03 next_comp          fixed bin (18) unsigned unaligned,
130        02 new                 aligned,
131         03 rel_text           fixed bin (18) unsigned unaligned,
132         03 rel_symb           fixed bin (18) unsigned unaligned,
133         03 rel_stat           fixed bin (18) unsigned unaligned,
134         03 text_pad           fixed bin (18) unsigned unaligned,
135         03 static_pad         fixed bin (18) unsigned unaligned,
136         03 symbol_pad         fixed bin (18) unsigned unaligned;
137 
138   /*** ****************************************************************/
139   /***                                                                */
140   /***    Name:     le_segnames                                       */
141   /***    Function: the segname table is used for two purposes:       */
142   /***               - to determine the target components of links    */
143   /***                 being resolved internally.                     */
144   /***               - to determine the segname definitions to be     */
145   /***                 emited for definitions being retained.         */
146   /***                                                                */
147   /*** ****************************************************************/
148 
149   dcl 01 le_segnames          aligned based,
150        02 header              aligned,
151         03 n_segnames         fixed bin,
152        02 segname             (segname_count refer (le_segnames.n_segnames)),
153         03 str                char (32) varying,
154         03 relp               fixed bin (18) unsigned unaligned,
155         03 pad                bit (18) unaligned;
156   dcl segname_count           fixed bin automatic;
157 
158   /*** ****************************************************************/
159   /***                                                                */
160   /***    Name:     le_definitions                                    */
161   /***    Function: the definition table contains the definitions     */
162   /***              from the input components and is used to resolve  */
163   /***              link targets, and regenerate definition entries   */
164   /***                                                                */
165   /*** ****************************************************************/
166 
167   dcl 01 le_definitions       aligned based,
168        02 header              aligned,
169         03 n_defs             fixed bin,
170         03 pad                bit (36),
171        02 def                 (def_count refer (le_definitions.n_defs))
172                               like le_definition;
173   dcl def_count               fixed bin automatic;
174 
175   dcl 01 le_definition        aligned based,
176        02 str                 char (256) varying,
177        02 type                fixed bin (18) unsigned unaligned,
178        02 relp                fixed bin (18) unsigned unaligned,
179        02 offset              fixed bin (18) unsigned unaligned,
180        02 new_offset          fixed bin (18) unsigned unaligned,
181        02 flags               aligned,
182         03 force_retain       bit (1) unaligned,
183         03 entrypoint         bit (1) unaligned,
184         03 ignore             bit (1) unaligned,
185         03 referenced         bit (1) unaligned,
186         03 no_link            bit (1) unaligned,
187         03 retain             bit (1) unaligned,
188         03 delete             bit (1) unaligned,
189         03 mbz                bit (29) unaligned;
190 
191   /*** ****************************************************************/
192   /***                                                                */
193   /***    Name:     le_options                                        */
194   /***    Function: the option table contains definition retention    */
195   /***              information.  The input retentions options are    */
196   /***              ordered such that a linear search of the option   */
197   /***              table for the first matching starname will give   */
198   /***              the correct retention state.                      */
199   /***                                                                */
200   /*** ****************************************************************/
201 
202   dcl 01 le_options           aligned based,
203        02 header              aligned,
204         03 n_opts             fixed bin,
205        02 opt                 (0 refer (le_options.n_opts)),
206         03 type               fixed bin (8) unaligned,
207         03 used               bit (1) unaligned,
208         03 inhibit_error      bit (1) unaligned,
209         03 class              fixed bin (6) unaligned,
210         03 order              fixed bin (17) unaligned,
211         03 segname            char (32) unaligned,
212         03 ep_name            char (256) unaligned;
213 
214   /*** ****************************************************************/
215   /***                                                                */
216   /***    Name:     le_links                                          */
217   /***    Function: the link table contains information on all of the */
218   /***              links in the input components. It is used to      */
219   /***              determine link targets, which library components  */
220   /***              will be included, and what init_info will be      */
221   /***              used, and where it will be placed.                */
222   /***                                                                */
223   /*** ****************************************************************/
224 
225   dcl 01 le_links             aligned based,
226        02 header              aligned,
227         03 offset_adjustment  fixed bin (18),
228         03 n_links            fixed bin,
229        02 link                (link_count refer (le_links.n_links))
230                               like le_link;
231   dcl link_count              fixed bin automatic;
232 
233   dcl 01 le_link              aligned based,
234        02 flags               unaligned,
235         03 used               bit (1),
236         03 mbx                bit (35),
237        02 type                fixed bin (6) unsigned unaligned,
238        02 class               fixed bin (6) unsigned unaligned,
239        02 mod                 bit (6) unaligned,
240        02 exp                 fixed bin (17) unaligned,
241        02 target              fixed bin (18) unsigned unaligned,
242        02 defx                fixed bin (18) unsigned unaligned,
243        02 relp                fixed bin (18) unsigned unaligned,
244        02 target_comp         fixed bin (18) unsigned unaligned,
245        02 target_link         fixed bin (18) unsigned unaligned,
246        02 extension           fixed bin (18) unsigned unaligned,
247        02 initp               ptr unaligned,
248        02 segnamep            ptr unaligned,
249        02 offsetp             ptr unaligned;
250 
251   /*** ****************************************************************/
252   /***                                                                */
253   /***    Name:     le_binaries                                       */
254   /***    Function: This table contains information about the output  */
255   /***              binaries.  It is primarily used for creation and  */
256   /***              backpatching of MSF output.                       */
257   /***                                                                */
258   /*** ****************************************************************/
259 
260   dcl 01 le_binaries          aligned based,
261        02 header              aligned,
262         03 n_binaries         fixed bin,
263         03 pad                bit (36),
264        02 binary              (0:0 refer (le_binaries.n_binaries)),
265         03 segp               ptr,
266         03 bc                 fixed bin (24),
267         03 uid                bit (36),
268         03 aclc               fixed bin,
269         03 aclp               ptr,
270         03 textp              ptr,
271         03 defnp              ptr,
272         03 linkp              ptr,
273         03 symbp              ptr,
274         03 statp              ptr,
275         03 textl              fixed bin (18) unsigned unaligned,
276         03 defnl              fixed bin (18) unsigned unaligned,
277         03 linkl              fixed bin (18) unsigned unaligned,
278         03 symbl              fixed bin (18) unsigned unaligned,
279         03 statl              fixed bin (18) unsigned unaligned,
280         03 mbz2               bit (18) unaligned;
281 
282   /*** ****************************************************************/
283   /***                                                                */
284   /***    Name:     le_patches                                        */
285   /***    Function: This table contains the list of backpatches to be */
286   /***              performed when the rest of the object creation is */
287   /***              complete. Since le_backpatch_ is the only routine */
288   /***              concerned with this,  it is maintained completely */
289   /***              internal to le_backpatch_.                        */
290   /***                                                                */
291   /*** ****************************************************************/
292 
293   dcl 01 le_patches           aligned based,
294        02 header              aligned,
295         03 n_patches          fixed bin,
296        02 patch               (0 refer (le_patches.n_patches)) like le_patch;
297 
298   dcl 01 le_patch             aligned based,
299        02 type                fixed bin,
300        02 comp                fixed bin,
301        02 relp                fixed bin (18) unsigned,
302        02 target              fixed bin,
303        02 index               fixed bin;
304 
305 /****  END OF:      le_data.incl.pl1                         *  *  *  *  *  */