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 autolearn=unavailable autolearn_force=no version=3.4.4 Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: Simon Wright Newsgroups: comp.lang.ada Subject: Re: How to use Zero Footprint runtime with GNAT GPL 2017 Date: Mon, 17 Jul 2017 08:27:37 +0100 Organization: A noiseless patient Spider Message-ID: References: <62ae5f16-9aa0-4512-89c5-11382eca8a88@googlegroups.com> <4f0cc0ce-2609-4581-9a8c-010a380214af@googlegroups.com> <4ede9dd4-9b14-432e-acf0-43de9e0e77b9@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: mx02.eternal-september.org; posting-host="3e869dd46caaf62b8fe97172e6f5b873"; logging-data="3226"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX198aaLL9nYZAigHXysQIYVff8LSVkhVf1g=" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2 (darwin) Cancel-Lock: sha1:zpoyh6BWUaUnMtjerSCiXQDLgQo= sha1:vB3jNT1YWso3L+g3coJRO7XBc3o= Xref: news.eternal-september.org comp.lang.ada:47436 Date: 2017-07-17T08:27:37+01:00 List-Id: Mark Lorenzen writes: > On Friday, July 14, 2017 at 11:35:09 PM UTC+2, ake.ragna...@gmail.com wrote: >> On windows 10 the hello world executable goes from 952kb to 131kb >> with the ZFP runtime, and on Linux Ubuntu 16.04 the executable goes >> from 588kb to 11kb. Comparing with hello world application for C++, >> the executable is 109kb on Windows 10 and 7,5kb in Linux Ubuntu. > > If you are concerned about the size of the executable, you should use > the -ffunction-sections and -fdata-sections compiler switches and let > the linker garbage collect unused symbols away (linker switch > --gc-sections). See > http://docs.adacore.com/gnat_ugn-docs/html/gnat_ugn/gnat_ugn.html > section 6.3.3. This works if you are using GNU ld; but not for native Darwin.