OSDN Git Service

* Makefile.in (reload1.o-warn): Remove.
[pf3gnuchains/gcc-fork.git] / gcc / ada / lib-writ.ads
1 ------------------------------------------------------------------------------
2 --                                                                          --
3 --                         GNAT COMPILER COMPONENTS                         --
4 --                                                                          --
5 --                             L I B . W R I T                              --
6 --                                                                          --
7 --                                 S p e c                                  --
8 --                                                                          --
9 --          Copyright (C) 1992-2006, Free Software Foundation, Inc.         --
10 --                                                                          --
11 -- GNAT is free software;  you can  redistribute it  and/or modify it under --
12 -- terms of the  GNU General Public License as published  by the Free Soft- --
13 -- ware  Foundation;  either version 2,  or (at your option) any later ver- --
14 -- sion.  GNAT is distributed in the hope that it will be useful, but WITH- --
15 -- OUT ANY WARRANTY;  without even the  implied warranty of MERCHANTABILITY --
16 -- or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License --
17 -- for  more details.  You should have  received  a copy of the GNU General --
18 -- Public License  distributed with GNAT;  see file COPYING.  If not, write --
19 -- to  the  Free Software Foundation,  51  Franklin  Street,  Fifth  Floor, --
20 -- Boston, MA 02110-1301, USA.                                              --
21 --                                                                          --
22 -- GNAT was originally developed  by the GNAT team at  New York University. --
23 -- Extensive contributions were provided by Ada Core Technologies Inc.      --
24 --                                                                          --
25 ------------------------------------------------------------------------------
26
27 --  This package contains the routines for writing the library information
28
29 package Lib.Writ is
30
31    -----------------------------------
32    -- Format of Library Information --
33    -----------------------------------
34
35    --  This section  describes the format of the library information that is
36    --  associated with object files. The exact method of this association is
37    --  potentially implementation dependent and is described and implemented
38    --  in package ali. From the point of view of the description here, all we
39    --  need to know is that the information is represented as a string of
40    --  characters that is somehow associated with an object file, and can be
41    --  retrieved. If no library information exists for a given object file,
42    --  then we take this as equivalent to the non-existence of the object
43    --  file, as if source file has not been previously compiled.
44
45    --  The library information is written as a series of lines of the form:
46
47    --    Key_Character parameter parameter ...
48
49    --  The following sections describe the format of these lines in detail
50
51    --------------------------------------
52    -- Making Changes to the ALI Format --
53    --------------------------------------
54
55    --  A number of tools use ali.adb to parse ali files. This means
56    --  that changes to this format can cause old versions of these tools
57    --  to be incompatible with new versions of the compiler. Any changes
58    --  to ali file formats must be carefully evaluated to understand any
59    --  such possible conflicts, and in particular, it is very undesirable
60    --  to create conflicts between older versions of GPS and newer versions
61    --  of the compiler.
62
63    --  If the following guidelines are respected, downward compatibility
64    --  problems (old tools reading new ali files) should be minimized:
65
66    --    The basic key character format must be kept
67
68    --    The V line must be the first line, this is checked by ali.adb
69    --    even in Ignore_Errors mode, and is used to verify that the file
70    --    at hand is indeed likely intended to be an ali file.
71
72    --    The P line must be present, though may be modified in contents
73    --    according to remaining guidelines. Again, ali.adb assumes the
74    --    P line is present even in Ignore_Errors mode.
75
76    --    New modifiers can generally be added (in particular adding new
77    --    two letter modifiers to the P or U lines is always safe)
78
79    --    Adding entirely new lines (with a new key letter) to the ali
80    --    file is always safe, at any point (other than before the V
81    --    line), since suchy lines will be ignored.
82
83    --  Following the guidelines in this section should ensure that this
84    --  problem is minimized and that old tools will be able to deal
85    --  successfully with new ali formats. Note that this does not apply
86    --  to the compiler itself, which always requires consistency between
87    --  the ali files and the binder. That is because one of the main
88    --  functions of the binder is to ensure consistency of the partition,
89    --  and this can be compromised if the ali files are inconsistent.
90
91    ------------------
92    -- Header Lines --
93    ------------------
94
95    --  The initial header lines in the file give information about the
96    --  compilation environment, and identify other special information
97    --  such as main program parameters.
98
99    --  ----------------
100    --  -- V  Version --
101    --  ----------------
102
103    --    V "xxxxxxxxxxxxxxxx"
104    --
105    --      This line indicates the library output version, as defined in
106    --      Gnatvsn. It ensures that separate object modules of a program are
107    --      consistent. It has to be changed if anything changes which would
108    --      affect successful binding of separately compiled modules.
109    --      Examples of such changes are modifications in the format of the
110    --      library info described in this package, or modifications to
111    --      calling sequences, or to the way that data is represented.
112
113    --    Note: the V line absolutely must be the first line, and no change
114    --    to the ALI format should change this, since even in Ignore_Errors
115    --    mode, Scan_ALI insists on finding a V line.
116
117    --  ---------------------
118    --  -- M  Main Program --
119    --  ---------------------
120
121    --    M type [priority] [T=time-slice] W=?
122
123    --      This line appears only if the main unit for this file is
124    --      suitable for use as a main program. The parameters are:
125
126    --        type
127
128    --          P for a parameterless procedure
129    --          F for a function returning a value of integral type
130    --            (used for writing a main program returning an exit status)
131
132    --        priority
133
134    --          Present only if there was a valid pragma Priority in the
135    --          corresponding unit to set the main task priority. It is
136    --          an unsigned decimal integer.
137
138    --        T=time-slice
139
140    --          Present only if there was a valid pragma Time_Slice in the
141    --          corresponding unit. It is an unsigned decimal integer in
142    --          the range 0 .. 10**9 giving the time slice value in units
143    --          of milliseconds. The actual significance of this parameter
144    --          is target dependent.
145
146    --        W=?
147
148    --          This parameter indicates the wide character encoding
149    --          method used when compiling the main program file. The ?
150    --          character is the single character used in the -gnatW?
151    --          switch. This is used to provide the default wide-character
152    --          encoding for Wide_Text_IO files.
153
154    --  -----------------
155    --  -- A  Argument --
156    --  -----------------
157
158    --    A argument
159
160    --      One of these lines appears for each of the arguments present
161    --      in the call to the gnat1 program. This can be used if it is
162    --      necessary to reconstruct this call (e.g. for fix and continue)
163
164    --  -------------------
165    --  -- P  Parameters --
166    --  -------------------
167
168    --    P <<parameters>>
169
170    --      Indicates various information that applies to the compilation
171    --      of the corresponding source unit. Parameters is a sequence of
172    --      zero or more two letter codes that indicate configuration
173    --      pragmas and other parameters that apply:
174    --
175    --      The arguments are as follows:
176    --
177    --         CE   Compilation errors. If this is present it means that the
178    --              ali file resulted from a compilation with the -gnatQ
179    --              switch set, and illegalities were detected. The ali
180    --              file contents may not be completely reliable, but the
181    --              format will be correct and complete. Note that NO is
182    --              always present if CE is present.
183    --
184    --         DB   Detect_Blocking pragma is in effect for all units in
185    --              this file.
186    --
187    --         FD   Configuration pragmas apply to all the units in this
188    --              file specifying a possibly non-standard floating point
189    --              format (VAX float with Long_Float using D_Float)
190    --
191    --         FG   Configuration pragmas apply to all the units in this
192    --              file specifying a possibly non-standard floating point
193    --              format (VAX float with Long_Float using G_Float)
194    --
195    --         FI   Configuration pragmas apply to all the units in this
196    --              file specifying a possibly non-standard floating point
197    --              format (IEEE Float)
198    --
199    --         Lx   A valid Locking_Policy pragma applies to all the units
200    --              in this file, where x is the first character (upper case)
201    --              of the policy name (e.g. 'C' for Ceiling_Locking)
202    --
203    --         NO   No object. This flag indicates that the units in this
204    --              file were not compiled to produce an object. This can
205    --              occur as a result of the use of -gnatc, or if no object
206    --              can be produced (e.g. when a package spec is compiled
207    --              instead of the body, or a subunit on its own).
208    --
209    --         NR   No_Run_Time. Indicates that a pragma No_Run_Time applies
210    --              to all units in the file.
211    --
212    --         NS   Normalize_Scalars pragma in effect for all units in
213    --              this file
214    --
215    --         Qx   A valid Queueing_Policy pragma applies to all the units
216    --              in this file, where x is the first character (upper case)
217    --              of the policy name (e.g. 'P' for Priority_Queueing).
218    --
219    --         SL   Indicates that the unit is an Interface to a Standalone
220    --              Library. Note that this indication is never given by the
221    --              compiler, but is added by the Project Manager in gnatmake
222    --              when an Interface ALI file is copied to the library
223    --              directory.
224
225    --         SS   This unit references System.Secondary_Stack (that is,
226    --              the unit makes use of the secondary stack facilities).
227    --
228    --         Tx   A valid Task_Dispatching_Policy pragma applies to all
229    --              the units in this file, where x is the first character
230    --              (upper case) of the corresponding policy name (e.g. 'F'
231    --              for FIFO_Within_Priorities).
232    --
233    --         UA  Unreserve_All_Interrupts pragma was processed in one or
234    --             more units in this file
235    --
236    --         ZX  Units in this file use zero-cost exceptions and have
237    --             generated exception tables. If ZX is not present, the
238    --             longjmp/setjmp exception scheme is in use.
239    --
240    --      Note that language defined units never output policy (Lx,Tx,Qx)
241    --      parameters. Language defined units must correctly handle all
242    --      possible cases. These values are checked for consistency by the
243    --      binder and then copied to the generated binder output file.
244
245    --    Note: The P line must be present. Even in Ignore_Errors mode,
246    --    Scan_ALI insists on finding a P line. So if changes are made to
247    --    the ALI format, they should not include removing the P line!
248
249    --  ---------------------
250    --  -- R  Restrictions --
251    --  ---------------------
252
253    --  The first R line records the status of restrictions generated by pragma
254    --  Restrictions encountered, as well as information on what the compiler
255    --  has been able to determine with respect to restrictions violations.
256    --  The format is:
257
258    --    R <<restriction-characters>> <<restriction-param-id-entries>>
259
260    --      The first parameter is a string of characters that records
261    --      information regarding restrictions that do not take parameter
262    --      not take parameter values. It is a string of characters, one
263    --      character for each value (in order) in All_Boolean_Restrictions.
264    --      There are three possible settings for each restriction:
265
266    --        r   Restricted. Unit was compiled under control of a pragma
267    --            Restrictions for the corresponding restriction. In
268    --            this case the unit certainly does not violate the
269    --            Restriction, since this would have been detected by
270    --            the compiler.
271
272    --        n   Not used. The unit was not compiled under control of a
273    --            pragma Restrictions for the corresponding restriction,
274    --            and does not make any use of the referenced feature.
275
276    --        v   Violated. The unit was not compiled under control of a
277    --            pragma Restrictions for the corresponding restriction,
278    --            and it does indeed use the referenced feature.
279
280    --      This information is used in the binder to check consistency,
281    --      i.e. to detect cases where one unit has "r" and another unit
282    --      has "v", which is not permitted, since these restrictions
283    --      are partition-wide.
284
285    --  The second parameter, which immediately follows the first (with
286    --  no separating space) gives restriction information for identifiers
287    --  for which a parameter is given.
288
289    --      The parameter is a string of entries, one for each value in
290    --      Restrict.All_Parameter_Restrictions. Each entry has two
291    --      components in sequence, the first indicating whether or not
292    --      there is a restriction, and the second indicating whether
293    --      or not the compiler detected violations. In the boolean case
294    --      it is not necessary to separate these, since if a restriction
295    --      is set, and violated, that is an error. But in the parameter
296    --      case, this is not true. For example, we can have a unit with
297    --      a pragma Restrictions (Max_Tasks => 4), where the compiler
298    --      can detect that there are exactly three tasks declared. Both
299    --      of these pieces of information must be passed to the binder.
300    --      The parameter of 4 is important in case the total number of
301    --      tasks in the partition is greater than 4. The parameter of
302    --      3 is important in case some other unit has a restrictions
303    --      pragma with Max_Tasks=>2.
304
305    --      The component for the presence of restriction has one of two
306    --      possible forms:
307
308    --         n   No pragma for this restriction is present in the
309    --             set of units for this ali file.
310
311    --         rN  At least one pragma for this restriction is present
312    --             in the set of units for this ali file. The value N
313    --             is the minimum parameter value encountered in any
314    --             such pragma. N is in the range of Integer (a value
315    --             larger than N'Last causes the pragma to be ignored).
316
317    --      The component for the violation detection has one of three
318    --      possible forms:
319
320    --         n   No violations were detected by the compiler
321
322    --         vN  A violation was detected. N is either the maximum or total
323    --             count of violations (depending on the checking type) in
324    --             all the units represented by the ali file). Note that
325    --             this setting is only allowed for restrictions that are
326    --             in Checked_[Max|Sum]_Parameter_Restrictions. The value
327    --             here is known to be exact by the compiler and is in the
328    --             range of Natural.
329
330    --         vN+ A violation was detected. The compiler cannot determine
331    --             the exact count of violations, but it is at least N.
332
333    --      There are no spaces within the parameter string, so the entry
334    --      described above in the header of this section for Max_Tasks would
335    --      appear as the string r4v3.
336
337    --      Note: The restrictions line is required to be present. Even in
338    --      Ignore_Errors mode, Scan_ALI expects to find an R line and will
339    --      signal a fatal error if it is missing. This means that future
340    --      changes to the ALI file format must retain the R line.
341
342    --  Subsequent R lines are present only if pragma Restriction No_Dependence
343    --  is used. There is one such line for each such pragma appearing in the
344    --  extended main unit. The format is
345
346    --    R unit_name
347
348    --      Here the unit name is in all lower case. The components of the unit
349    --      name are separated by periods. The names themselves are in encoded
350    --      form, as documented in Namet.
351
352    --  ------------------------
353    --  -- I Interrupt States --
354    --  ------------------------
355
356    --    I interrupt-number interrupt-state line-number
357
358    --      This line records information from an Interrupt_State pragma.
359    --      There is one line for each separate pragma, and if no such
360    --      pragmas are used, then no I lines are present.
361
362    --      The interrupt-number is an unsigned positive integer giving
363    --      the value of the interrupt as defined in Ada.Interrupts.Names.
364
365    --      The interrupt-state is one of r/s/u for Runtime/System/User
366
367    --      The line number is an unsigned decimal integer giving the
368    --      line number of the corresponding Interrupt_State pragma.
369    --      This is used in consistency messages.
370
371    --  -------------------------------------
372    --  -- S Priority Specific Dispatching --
373    --  -------------------------------------
374
375    --    S policy_identifier first_priority last_priority line-number
376
377    --      This line records information from a Priority_Specific_Dispatching
378    --      pragma. There is one line for each separate pragma, and if no such
379    --      pragmas are used, then no S lines are present.
380
381    --      The policy_identifier is the first character (upper case) of the
382    --      corresponding policy name (e.g. 'F' for FIFO_Within_Priorities).
383
384    --      The first_priority and last_priority fields define the range of
385    --      priorities to which the specified dispatching policy apply.
386
387    --      The line number is an unsigned decimal integer giving the
388    --      line number of the corresponding Priority_Specific_Dispatching
389    --      pragma. This is used in consistency messages.
390
391    ----------------------------
392    -- Compilation Unit Lines --
393    ----------------------------
394
395    --  Following these header lines, a set of information lines appears for
396    --  each compilation unit that appears in the corresponding object file.
397    --  In particular, when a package body or subprogram body is compiled,
398    --  there will be two sets of information, one for the spec and one for
399    --  the body. with the entry for the body appearing first. This is the
400    --  only case in which a single ALI file contains more than one unit (in
401    --  particular note that subunits do *not* count as compilation units for
402    --  this purpose, and generate no library information, since they are
403    --  inlined).
404
405    --  --------------------
406    --  -- U  Unit Header --
407    --  --------------------
408
409    --  The lines for each compilation unit have the following form
410
411    --    U unit-name source-name version <<attributes>>
412    --
413    --      This line identifies the unit to which this section of the
414    --      library information file applies. The first three parameters are
415    --      the unit name in internal format, as described in package Uname,
416    --      and the name of the source file containing the unit.
417    --
418    --      Version is the version given as eight hexadecimal characters
419    --      with upper case letters. This value is the exclusive or of the
420    --      source checksums of the unit and all its semantically dependent
421    --      units.
422    --
423    --      The <<attributes>> are a series of two letter codes indicating
424    --      information about the unit:
425    --
426    --         BD  Unit does not have pragma Elaborate_Body, but the elaboration
427    --             circuit has determined that it would be a good idea if this
428    --             pragma were present, since the body of the package contains
429    --             elaboration code that modifies one or more variables in the
430    --             visible part of the package. The binder will try, but does
431    --             not promise, to keep the elaboration of the body close to
432    --             the elaboration of the spec.
433    --
434    --         DE  Dynamic Elaboration. This unit was compiled with the
435    --             dynamic elaboration model, as set by either the -gnatE
436    --             switch or pragma Elaboration_Checks (Dynamic).
437    --
438    --         EB  Unit has pragma Elaborate_Body
439    --
440    --         EE  Elaboration entity is present which must be set true when
441    --             the unit is elaborated. The name of the elaboration entity
442    --             is formed from the unit name in the usual way. If EE is
443    --             present, then this boolean must be set True as part of the
444    --             elaboration processing routine generated by the binder.
445    --             Note that EE can be set even if NE is set. This happens
446    --             when the boolean is needed solely for checking for the
447    --             case of access before elaboration.
448    --
449    --         GE  Unit is a generic declaration, or corresponding body
450    --
451    --         IL  Unit source uses a style with identifiers in all lower
452    --         IU  case (IL) or all upper case (IU). If the standard mixed-
453    --             case usage is detected, or the compiler cannot determine
454    --             the style, then no I parameter will appear.
455    --
456    --         IS  Initialize_Scalars pragma applies to this unit
457    --
458    --         KM  Unit source uses a style with keywords in mixed case
459    --         KU  (KM) or all upper case (KU). If the standard lower-case
460    --             usage is detected, or the compiler cannot determine the
461    --             style, then no K parameter will appear.
462    --
463    --         NE  Unit has no elaboration routine. All subprogram bodies
464    --             and specs are in this category. Package bodies and specs
465    --             may or may not have NE set, depending on whether or not
466    --             elaboration code is required. Set if N_Compilation_Unit
467    --             node has flag Has_No_Elaboration_Code set.
468    --
469    --         PK  Unit is package, rather than a subprogram
470    --
471    --         PU  Unit has pragma Pure
472    --
473    --         PR  Unit has pragma Preelaborate
474    --
475    --         RA  Unit declares a Remote Access to Class-Wide (RACW) type
476    --
477    --         RC  Unit has pragma Remote_Call_Interface
478    --
479    --         RT  Unit has pragma Remote_Types
480    --
481    --         SP  Unit has pragma Shared_Passive.
482    --
483    --         SU  Unit is a subprogram, rather than a package
484    --
485    --      The attributes may appear in any order, separated by spaces.
486
487    --  ---------------------
488    --  -- W  Withed Units --
489    --  ---------------------
490
491    --  Following each U line, is a series of lines of the form
492
493    --    W unit-name [source-name lib-name] [E] [EA] [ED] [AD]
494    --
495    --      One of these lines is present for each unit that is mentioned in
496    --      an explicit with clause by the current unit. The first parameter
497    --      is the unit name in internal format. The second parameter is the
498    --      file name of the file that must be compiled to compile this unit.
499    --      It is usually the file for the body, except for packages
500    --      which have no body; for units that need a body, if the source file
501    --      for the body cannot be found, the file name of the spec is used
502    --      instead. The third parameter is the file name of the library
503    --      information file that contains the results of compiling this unit.
504    --      The optional modifiers are used as follows:
505    --
506    --        E   pragma Elaborate applies to this unit
507    --
508    --        EA  pragma Elaborate_All applies to this unit
509    --
510    --        ED  Elaborate_Desirable set for this unit, which means
511    --            that there is no Elaborate, but the analysis suggests
512    --            that Program_Error may be raised if the Elaborate
513    --            conditions cannot be satisfied. The binder will attempt
514    --            to treat ED as E if it can.
515    --
516    --        AD  Elaborate_All_Desirable set for this unit, which means
517    --            that there is no Elaborate_All, but the analysis suggests
518    --            that Program_Error may be raised if the Elaborate_All
519    --            conditions cannot be satisfied. The binder will attempt
520    --            to treat AD as EA if it can.
521    --
522    --      The parameter source-name and lib-name are omitted for the case
523    --      of a generic unit compiled with earlier versions of GNAT which
524    --      did not generate object or ali files for generics.
525
526    --  -----------------------
527    --  -- L  Linker_Options --
528    --  -----------------------
529
530    --  Following the W lines (if any, or the U line if not), are an
531    --  optional series of lines that indicates the usage of the pragma
532    --  Linker_Options in the associated unit. For each appearence of a
533    --  pragma Linker_Options (or Link_With) in the unit, a line is
534    --  present with the form:
535
536    --    L "string"
537
538    --      where string is the string from the unit line enclosed in quotes.
539    --      Within the quotes the following can occur:
540
541    --        c    graphic characters in range 20-7E other than " or {
542    --        ""   indicating a single " character
543    --        {hh} indicating a character whose code is hex hh (0-9,A-F)
544    --        {00} [ASCII.NUL] is used as a separator character
545    --             to separate multiple arguments of a single
546    --             Linker_Options pragma.
547
548    --      For further details, see Stringt.Write_String_Table_Entry. Note
549    --      that wide characters in the form {hhhh} cannot be produced, since
550    --      pragma Linker_Option accepts only String, not Wide_String.
551
552    --      The L lines are required to appear in the same order as the
553    --      corresponding Linker_Options (or Link_With) pragmas appear in
554    --      the source file, so that this order is preserved by the binder
555    --      in constructing the set of linker arguments.
556
557    ---------------------
558    -- Reference Lines --
559    ---------------------
560
561    --  The reference lines contain information about references from
562    --  any of the units in the compilation (including, body version
563    --  and version attributes, linker options pragmas and source
564    --  dependencies.
565
566    --  ------------------------------------
567    --  -- E  External Version References --
568    --  ------------------------------------
569
570    --  One of these lines is present for each use of 'Body_Version or
571    --  'Version in any of the units of the compilation. These are used
572    --  by the linker to determine which version symbols must be output.
573    --  The format is simply:
574
575    --    E name
576
577    --  where name is the external name, i.e. the unit name with either
578    --  a S or a B for spec or body version referenced (Body_Version
579    --  always references the body, Version references the Spec, except
580    --  in the case of a reference to a subprogram with no separate spec).
581    --  Upper half and wide character codes are encoded using the same
582    --  method as in Namet (Uhh for upper half, Whhhh for wide character,
583    --  where hh are hex digits).
584
585    --  ---------------------
586    --  -- D  Dependencies --
587    --  ---------------------
588
589    --  The dependency lines indicate the source files on which the compiled
590    --  units depend. This is used by the binder for consistency checking.
591    --  These lines are also referenced by the cross-reference information.
592
593    --    D source-name time-stamp checksum [subunit-name] line:file-name
594
595    --      The time-stamp field contains the time stamp of the
596    --      corresponding source file. See types.ads for details on
597    --      time stamp representation.
598
599    --      The checksum is an 8-hex digit representation of the source
600    --      file checksum, with letters given in lower case.
601
602    --      The subunit name is present only if the dependency line is for
603    --      a subunit. It contains the fully qualified name of the subunit
604    --      in all lower case letters.
605
606    --      The line:file-name entry is present only if a Source_Reference
607    --      pragma appeared in the source file identified by source-name.
608    --      In this case, it gives the information from this pragma. Note
609    --      that this allows cross-reference information to be related back
610    --      to the original file. Note: the reason the line number comes
611    --      first is that a leading digit immediately identifies this as
612    --      a Source_Reference entry, rather than a subunit-name.
613
614    --      A line number of zero for line: in this entry indicates that
615    --      there is more than one source reference pragma. In this case,
616    --      the line numbers in the cross-reference are correct, and refer
617    --      to the original line number, but there is no information that
618    --      allows a reader of the ALI file to determine the exact mapping
619    --      of physical line numbers back to the original source.
620
621    --      Files with a zero checksum and a non-zero time stamp are in general
622    --      files on which the compilation depends but which are not Ada files
623    --      with further dependencies. This includes preprocessor data files
624    --      and preprocessor definition files.
625
626    --      Note: blank lines are ignored when the library information is
627    --      read, and separate sections of the file are separated by blank
628    --      lines to ease readability. Blanks between fields are also
629    --      ignored.
630
631    --      For entries corresponding to files that were not present (and
632    --      thus resulted in error messages), or for files that are not
633    --      part of the dependency set, both the time stamp and checksum
634    --      are set to all zero characters. These dummy entries are ignored
635    --      by the binder in dependency checking, but must be present for
636    --      proper interpretation of the cross-reference data.
637
638    --------------------------
639    -- Cross-Reference Data --
640    --------------------------
641
642    --  The cross-reference data follows the dependency lines. See
643    --  the spec of Lib.Xref for details on the format of this data.
644
645    ----------------------
646    -- Global_Variables --
647    ----------------------
648
649    --  The table structure defined here stores one entry for each
650    --  Interrupt_State pragma encountered either in the main source or
651    --  in an ancillary with'ed source. Since interrupt state values
652    --  have to be consistent across all units in a partition, we may
653    --  as well detect inconsistencies at compile time when we can.
654
655    type Interrupt_State_Entry is record
656       Interrupt_Number : Pos;
657       --  Interrupt number value
658
659       Interrupt_State : Character;
660       --  Set to r/s/u for Runtime/System/User
661
662       Pragma_Loc : Source_Ptr;
663       --  Location of pragma setting this value in place
664    end record;
665
666    package Interrupt_States is new Table.Table (
667      Table_Component_Type => Interrupt_State_Entry,
668      Table_Index_Type     => Nat,
669      Table_Low_Bound      => 1,
670      Table_Initial        => 30,
671      Table_Increment      => 200,
672      Table_Name           => "Name_Interrupt_States");
673
674    --  The table structure defined here stores one entry for each
675    --  Priority_Specific_Dispatching pragma encountered either in the main
676    --  source or in an ancillary with'ed source. Since
677    --  have to be consistent across all units in a partition, we may
678    --  as well detect inconsistencies at compile time when we can.
679
680    type Specific_Dispatching_Entry is record
681       Dispatching_Policy : Character;
682       --  First character (upper case) of the corresponding policy name
683
684       First_Priority     : Nat;
685       --  Lower bound of the priority range to which the specified dispatching
686       --  policy applies.
687
688       Last_Priority      : Nat;
689       --  Upper bound of the priority range to which the specified dispatching
690       --  policy applies.
691
692       Pragma_Loc         : Source_Ptr;
693       --  Location of pragma setting this value in place
694    end record;
695
696    package Specific_Dispatching is new Table.Table (
697      Table_Component_Type => Specific_Dispatching_Entry,
698      Table_Index_Type     => Nat,
699      Table_Low_Bound      => 1,
700      Table_Initial        => 10,
701      Table_Increment      => 100,
702      Table_Name           => "Name_Priority_Specific_Dispatching");
703
704    -----------------
705    -- Subprograms --
706    -----------------
707
708    procedure Ensure_System_Dependency;
709    --  This procedure ensures that a dependency is created on system.ads.
710    --  Even if there is no semantic dependency, Targparm has read the
711    --  file to acquire target parameters, so we need a source dependency.
712
713    procedure Write_ALI (Object : Boolean);
714    --  This procedure writes the library information for the current main unit
715    --  The Object parameter is true if an object file is created, and false
716    --  otherwise.
717    --
718    --  Note: in the case where we are not generating code (-gnatc mode), this
719    --  routine only writes an ALI file if it cannot find an existing up to
720    --  date ALI file. If it *can* find an existing up to date ALI file, then
721    --  it reads this file and sets the Lib.Compilation_Arguments table from
722    --  the A lines in this file.
723
724    procedure Add_Preprocessing_Dependency (S : Source_File_Index);
725    --  Indicate that there is a dependency to be added on a preprocessing
726    --  data file or on a preprocessing definition file.
727
728 end Lib.Writ;