GNATELIM(1)
β¨ gnatelim β¨
gnatelim β the ASIS Tools era girlie who literally goes through your Ada program and βοΈ eliminates dead code. bestie, she's an icon, she's a legend, and she's about to make your executable smaller. π
π NAME π
gnatelim β eliminate dead code from Ada programs π¦
πΈ SYNOPSIS πΈ
gnatelim [OPTION]... name
π DESCRIPTION π
okay so picture this: you're working with a program that shares some set of Ada packages with other programs. and it may happen that your program only uses a part of the subprograms defined in those packages β meanwhile the code generated for all the unused subprograms is just... sitting there, making your executable bigger. not cute. π
gnatelim is a utility that tracks unused subprograms in an Ada program. its output is 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 recompiling your program with these pragmas, you may decrease the size of its executable, because the compiler will not create the code for unused subprograms. slay. π
β¨
gnatelim is an ASIS application developed on top of the ASIS implementation for GNAT. she needs a set of tree files representing a program to analyze, plus the bind file for its main subprogram, all created in the current directory. π«Ά
heads up bestie: for the current version, it is 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. no cap, that one's on you. π
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. she's thorough, she's committed, she's taking her time. β³
β¨ OPTIONS β¨
-vβ verbose mode:gnatelimversion information is printed (in the form of Ada comments) in stdout; the names of the files being processed are printed to standard-error. she's telling you everything, bestie π£οΈ-vfβ same as-v, but in addition various debugging information and information reflecting some details of the analysis done bygnatelimare printed to standard-error. maximum yapping, maximum lore π-aβ process RTL components: by default,gnatelimdoes not analyze the units which are the components of the GNAT Run-Time Library (RTL), and it does not generateEliminatepragmas for subprograms declared in the RTL. if'-a'option is set, RTL components are also analyzed (except some units, which contains subprograms implicitly called by the compiler). going where she normally doesn't go π-mβ check missed units: if this option is set,gnatelimchecks that all the units which (according to the bind file) has to be analyzed bygnatelimare really represented by the set of tree files processed bygnatelim(depending on whether or not'-a'option is set). by default (that is, if'-m'option is not set),gnatelimanalyzes a set of units represented by a given set of tree files "as is" (excluding library packages which require bodies, but for which bodies are not available). no missing pieces, we check π§
π¦ SEE ALSO π¦
gnat(1), asistant(1), gnat2xml(1), gnatcheck(1), gnatmetric(1), gnatpp(1), gnatstub(1), gnattest(1) β the whole friend group, honestly π
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. π
and that's the whole page, bestie π this one shipped with Debian GNU/Linux, dated 2014-08-09, and yes it's literally titled GNATELIM(1) β iconic name, iconic tool, periodt. πβ¨π¦π
π¦ where this page comes from
- ubuntu jammy: asis-programs 2019-5 Β· GPL-3.0-or-later
- Copyright (C) 1996 Erick Branderhorst <branderh@debian.org>
- Copyright (C) 2014 Nicolas Boulenguez <nicolas@debian.org>
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms