GNATELIM(1) | ASIS Tools | GNATELIM(1) |
gnatelim - eliminate dead code from Ada programs
gnatelim [OPTION]... name
When you are working with a program which shares some set of Ada packages with other programs, it may happen, that your program uses only a part of subprogram defined in these packages, whereas the code created for unused subprograms increases the size of the executable your program.
gnatelim is a utility tracking unused subprograms in an Ada program. Its output consists of a list of Eliminate pragmas marking all the subprograms that are declared, but never called in a given program. Eliminate is a GNAT-specific pragma. By ecompiling your program with these pragmas, you may decrease the size of its executable, because the compiler will not create the code for unused subprograms.
gnatelim is an ASIS application developed on top of the ASIS implementation for GNAT. It needs a set of tree files representing a program to analyze and the bind file for its main subprogram to be created in the current directory. For the current version, it is a the user's responsibility to maintain the consistency of the set of tree files processed by gnatelim, if the user also changes the sources of the Ada program to be processed.
To produce a list of Eliminate pragmas, gnatelim has to do an extensive analysis and it may take some time. For example, to process itself, gnatelim takes 4 minutes of CPU time on a Pentium 200.
gnat(1), asistant(1), gnat2xml(1), gnatcheck(1), gnatmetric(1), gnatpp(1), gnatstub(1), gnattest(1)
Documentation about the ASIS tools may be found in /usr/share/doc/asis-doc/ if the asis-doc package is installed. The reference documentation about ASIS is excluded due to license problems, but may be found in various formats at http://libre.adacore.com/developers/documentation.
2014-08-09 | Debian GNU/Linux |