used, then in process all the files from the argument project but
not just the closure of the main subprogram.
- After a full successful build of the main subprogram ``gnatelim`` can be
- called without specifying sources to analyse, in this case it computes
- the source closure of the main unit from the :file:`ALI` files.
+ In all the other cases (that are typical cases of ``gnatelim`` usage, when
+ the only ``gnatelim`` parameter is the name of the source file containing
+ the main subprogram) gnatelim needs the full closure of the main subprogram.
+ When called with a project file, gnatelim computes this closure itself.
+ Otherwise it assumes that it can reuse the results of the previous
+ build of the main subprogram.
If the set of sources to be processed by ``gnatelim`` contains sources with
preprocessing directives
the ``gnatelim`` call, and the generated set of pragmas ``Eliminate``
will correspond to preprocessed sources.
- The following command will create the set of :file:`ALI` files needed for
- ``gnatelim``:
-
- ::
-
- $ gnatmake -c Main_Prog
-
- Note that ``gnatelim`` does not need object files.
-
.. _Running_gnatelim:
of the argument sources). On a multiprocessor machine this speeds up processing
of big sets of argument sources. If ``n`` is 0, then the maximum number of
parallel tree creations is the number of core processors on the platform.
+ This possibility is disabled if ``gnatelim`` has to compute the closure
+ of the main unit.
.. index:: -q (gnatelim)
of executable.
- .. _Making_Your_Executables_Smaller:
-
- Making Your Executables Smaller
- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-
- In order to get a smaller executable for your program you now have to
- recompile the program completely with the configuration file containing
- pragmas Eliminate generated by gnatelim. If these pragmas are placed in
- :file:`gnat.adc` file located in your current directory, just do:
-
- ::
-
- $ gnatmake -f main_prog
-
- (Use the :switch:`-f` option for ``gnatmake`` to
- recompile everything
- with the set of pragmas ``Eliminate`` that you have obtained with
- ``gnatelim``).
-
- Be aware that the set of ``Eliminate`` pragmas is specific to each
- program. It is not recommended to merge sets of ``Eliminate``
- pragmas created for different programs in one configuration file.
-
-
- .. _Summary_of_the_gnatelim_Usage_Cycle:
-
- Summary of the ``gnatelim`` Usage Cycle
- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-
- Here is a quick summary of the steps to be taken in order to reduce
- the size of your executables with ``gnatelim``. You may use
- other GNAT options to control the optimization level,
- to produce the debugging information, to set search path, etc.
-
- * Create a complete set of :file:`ALI` files (if the program has not been
- built already)
-
- ::
-
- $ gnatmake -c main_prog
-
- * Generate a list of ``Eliminate`` pragmas in default configuration file
- :file:`gnat.adc` in the current directory
-
- ::
-
- $ gnatelim main_prog >[>] gnat.adc
-
- * Recompile the application
-
- ::
-
- $ gnatmake -f main_prog
-
-
-
.. index:: Overflow checks
.. index:: Checks (overflow)
@node Overflow Check Handling in GNAT,Performing Dimensionality Analysis in GNAT,Improving Performance,GNAT and Program Execution
-@anchor{gnat_ugn/gnat_and_program_execution id55}@anchor{16a}@anchor{gnat_ugn/gnat_and_program_execution overflow-check-handling-in-gnat}@anchor{27}
+@anchor{gnat_ugn/gnat_and_program_execution id53}@anchor{16a}@anchor{gnat_ugn/gnat_and_program_execution overflow-check-handling-in-gnat}@anchor{27}
@section Overflow Check Handling in GNAT
@end menu
@node Background,Management of Overflows in GNAT,,Overflow Check Handling in GNAT
-@anchor{gnat_ugn/gnat_and_program_execution id56}@anchor{1c1}@anchor{gnat_ugn/gnat_and_program_execution background}@anchor{1c2}
+@anchor{gnat_ugn/gnat_and_program_execution id54}@anchor{1c1}@anchor{gnat_ugn/gnat_and_program_execution background}@anchor{1c2}
@subsection Background
would prefer this precondition to be considered True at run time).
@node Management of Overflows in GNAT,Specifying the Desired Mode,Background,Overflow Check Handling in GNAT
-@anchor{gnat_ugn/gnat_and_program_execution id57}@anchor{1c3}@anchor{gnat_ugn/gnat_and_program_execution management-of-overflows-in-gnat}@anchor{1c4}
+@anchor{gnat_ugn/gnat_and_program_execution id55}@anchor{1c3}@anchor{gnat_ugn/gnat_and_program_execution management-of-overflows-in-gnat}@anchor{1c4}
@subsection Management of Overflows in GNAT
range checks).
@node Specifying the Desired Mode,Default Settings,Management of Overflows in GNAT,Overflow Check Handling in GNAT
-@anchor{gnat_ugn/gnat_and_program_execution specifying-the-desired-mode}@anchor{f8}@anchor{gnat_ugn/gnat_and_program_execution id58}@anchor{1c5}
+@anchor{gnat_ugn/gnat_and_program_execution id56}@anchor{1c5}@anchor{gnat_ugn/gnat_and_program_execution specifying-the-desired-mode}@anchor{f8}
@subsection Specifying the Desired Mode
type (@code{STRICT} mode).
@node Default Settings,Implementation Notes,Specifying the Desired Mode,Overflow Check Handling in GNAT
-@anchor{gnat_ugn/gnat_and_program_execution id59}@anchor{1c6}@anchor{gnat_ugn/gnat_and_program_execution default-settings}@anchor{1c7}
+@anchor{gnat_ugn/gnat_and_program_execution id57}@anchor{1c6}@anchor{gnat_ugn/gnat_and_program_execution default-settings}@anchor{1c7}
@subsection Default Settings
intermediate results.
@node Implementation Notes,,Default Settings,Overflow Check Handling in GNAT
-@anchor{gnat_ugn/gnat_and_program_execution implementation-notes}@anchor{1c8}@anchor{gnat_ugn/gnat_and_program_execution id60}@anchor{1c9}
+@anchor{gnat_ugn/gnat_and_program_execution implementation-notes}@anchor{1c8}@anchor{gnat_ugn/gnat_and_program_execution id58}@anchor{1c9}
@subsection Implementation Notes
platforms).
@node Performing Dimensionality Analysis in GNAT,Stack Related Facilities,Overflow Check Handling in GNAT,GNAT and Program Execution
-@anchor{gnat_ugn/gnat_and_program_execution id61}@anchor{16b}@anchor{gnat_ugn/gnat_and_program_execution performing-dimensionality-analysis-in-gnat}@anchor{28}
+@anchor{gnat_ugn/gnat_and_program_execution performing-dimensionality-analysis-in-gnat}@anchor{28}@anchor{gnat_ugn/gnat_and_program_execution id59}@anchor{16b}
@section Performing Dimensionality Analysis in GNAT
dimension vector for the formal parameter).
@node Stack Related Facilities,Memory Management Issues,Performing Dimensionality Analysis in GNAT,GNAT and Program Execution
-@anchor{gnat_ugn/gnat_and_program_execution stack-related-facilities}@anchor{29}@anchor{gnat_ugn/gnat_and_program_execution id62}@anchor{16c}
+@anchor{gnat_ugn/gnat_and_program_execution stack-related-facilities}@anchor{29}@anchor{gnat_ugn/gnat_and_program_execution id60}@anchor{16c}
@section Stack Related Facilities
@end menu
@node Stack Overflow Checking,Static Stack Usage Analysis,,Stack Related Facilities
-@anchor{gnat_ugn/gnat_and_program_execution id63}@anchor{1ca}@anchor{gnat_ugn/gnat_and_program_execution stack-overflow-checking}@anchor{f4}
+@anchor{gnat_ugn/gnat_and_program_execution id61}@anchor{1ca}@anchor{gnat_ugn/gnat_and_program_execution stack-overflow-checking}@anchor{f4}
@subsection Stack Overflow Checking
operating system documentation.
@node Static Stack Usage Analysis,Dynamic Stack Usage Analysis,Stack Overflow Checking,Stack Related Facilities
-@anchor{gnat_ugn/gnat_and_program_execution id64}@anchor{1cb}@anchor{gnat_ugn/gnat_and_program_execution static-stack-usage-analysis}@anchor{f5}
+@anchor{gnat_ugn/gnat_and_program_execution static-stack-usage-analysis}@anchor{f5}@anchor{gnat_ugn/gnat_and_program_execution id62}@anchor{1cb}
@subsection Static Stack Usage Analysis
bytes. The wording is in keeping with the qualifier documented above.
@node Dynamic Stack Usage Analysis,,Static Stack Usage Analysis,Stack Related Facilities
-@anchor{gnat_ugn/gnat_and_program_execution id65}@anchor{1cc}@anchor{gnat_ugn/gnat_and_program_execution dynamic-stack-usage-analysis}@anchor{121}
+@anchor{gnat_ugn/gnat_and_program_execution dynamic-stack-usage-analysis}@anchor{121}@anchor{gnat_ugn/gnat_and_program_execution id63}@anchor{1cc}
@subsection Dynamic Stack Usage Analysis
stack-usage reports at run time. See its body for the details.
@node Memory Management Issues,,Stack Related Facilities,GNAT and Program Execution
-@anchor{gnat_ugn/gnat_and_program_execution id66}@anchor{16d}@anchor{gnat_ugn/gnat_and_program_execution memory-management-issues}@anchor{2a}
+@anchor{gnat_ugn/gnat_and_program_execution id64}@anchor{16d}@anchor{gnat_ugn/gnat_and_program_execution memory-management-issues}@anchor{2a}
@section Memory Management Issues
@end menu
@node Some Useful Memory Pools,The GNAT Debug Pool Facility,,Memory Management Issues
-@anchor{gnat_ugn/gnat_and_program_execution id67}@anchor{1cd}@anchor{gnat_ugn/gnat_and_program_execution some-useful-memory-pools}@anchor{1ce}
+@anchor{gnat_ugn/gnat_and_program_execution id65}@anchor{1cd}@anchor{gnat_ugn/gnat_and_program_execution some-useful-memory-pools}@anchor{1ce}
@subsection Some Useful Memory Pools
@end quotation
@node The GNAT Debug Pool Facility,,Some Useful Memory Pools,Memory Management Issues
-@anchor{gnat_ugn/gnat_and_program_execution id68}@anchor{1cf}@anchor{gnat_ugn/gnat_and_program_execution the-gnat-debug-pool-facility}@anchor{1d0}
+@anchor{gnat_ugn/gnat_and_program_execution id66}@anchor{1cf}@anchor{gnat_ugn/gnat_and_program_execution the-gnat-debug-pool-facility}@anchor{1d0}
@subsection The GNAT Debug Pool Facility