Next: , Previous: About gnatelim, Up: Reducing Size of Ada Executables with gnatelim


7.3.2 Running gnatelim

gnatelim has the following command-line interface:

     $ gnatelim [options] name

name should be a name of a source file that contains the main subprogram of a program (partition).

gnatelim has the following switches:

-q
Quiet mode: by default gnatelim outputs to the standard error stream the number of program units left to be processed. This option turns this trace off.
-v
Verbose mode: gnatelim version information is printed as Ada comments to the standard output stream. Also, in addition to the number of program units left gnatelim will output the name of the current unit being processed.
-a
Also look for subprograms from the GNAT run time that can be eliminated. Note that when gnat.adc is produced using this switch, the entire program must be recompiled with switch -a to gnatmake.
-Idir
When looking for source files also look in directory dir. Specifying -I- instructs gnatelim not to look for sources in the current directory.
-bbind_file
Specifies bind_file as the bind file to process. If not set, the name of the bind file is computed from the full expanded Ada name of a main subprogram.
-Cconfig_file
Specifies a file config_file that contains configuration pragmas. The file must be specified with full path.
--GCC=compiler_name
Instructs gnatelim to use specific gcc compiler instead of one available on the path.
--GNATMAKE=gnatmake_name
Instructs gnatelim to use specific gnatmake instead of one available on the path.

gnatelim sends its output to the standard output stream, and all the tracing and debug information is sent to the standard error stream. In order to produce a proper GNAT configuration file gnat.adc, redirection must be used:

     $ gnatelim main_prog.adb > gnat.adc

or

     $ gnatelim main_prog.adb >> gnat.adc

in order to append the gnatelim output to the existing contents of gnat.adc.