From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM autolearn=unavailable autolearn_force=no version=3.4.4 X-Received: by 10.224.42.141 with SMTP id s13mr21609528qae.3.1372592070899; Sun, 30 Jun 2013 04:34:30 -0700 (PDT) X-Received: by 10.49.3.37 with SMTP id 5mr587395qez.30.1372592070886; Sun, 30 Jun 2013 04:34:30 -0700 (PDT) Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!news.eternal-september.org!mx05.eternal-september.org!feeder.eternal-september.org!feeder.erje.net!eu.feeder.erje.net!news.glorb.com!j2no3031665qak.0!news-out.google.com!f7ni121qai.0!nntp.google.com!j2no3031657qak.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Sun, 30 Jun 2013 04:34:30 -0700 (PDT) In-Reply-To: <9cbe0ad4-f54c-4c99-ba58-4db027ae962e@googlegroups.com> Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=88.128.80.7; posting-account=mOyWBQoAAAD7S-NBmMUOr9hRClcL0vqR NNTP-Posting-Host: 88.128.80.7 References: <9cbe0ad4-f54c-4c99-ba58-4db027ae962e@googlegroups.com> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <70b1d2b0-d5ab-431e-84b9-9f00af08dbe2@googlegroups.com> Subject: Re: Size optimization for objects From: rrr.eee.27@gmail.com Injection-Date: Sun, 30 Jun 2013 11:34:30 +0000 Content-Type: text/plain; charset=ISO-8859-1 Xref: news.eternal-september.org comp.lang.ada:15990 Date: 2013-06-30T04:34:30-07:00 List-Id: On Friday, June 28, 2013 9:49:20 PM UTC+2, Rego, P. wrote: > I am trying to reduce the size of an application. Is there a tool (in GNAT) which generates a report for each package elements, of how much they contribute to the total size of the obj (and the final executable)? > strip(1) reduces the size of an application in the file system by removing the debug info. If you want to see the size of various elements in a binary use nm(1). nm --print-size --size-sort might give you some hints where to start remving elements. If you compile with -fdata-sections -ffunction-sections and link with --gc-sections the linker automatically removes all unused code and all unused data. That is typically easier than gnatelim. HTH Rolf