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!mx02.eternal-september.org!feeder.eternal-september.org!aioe.org!news.ecp.fr!news.jacob-sparre.dk!loke.jacob-sparre.dk!pnx.dk!.POSTED!not-for-mail From: "Randy Brukardt" Newsgroups: comp.lang.ada Subject: Re: Size of linked program increasing with new version of GNAT. Date: Fri, 26 Dec 2014 19:48:03 -0600 Organization: Jacob Sparre Andersen Research & Innovation Message-ID: References: <1419604367.2226.5.camel@obry.net> <4a5a3301-958b-41fd-9d1a-7ab35021daa0@googlegroups.com> NNTP-Posting-Host: rrsoftware.com X-Trace: loke.gir.dk 1419644883 16724 24.196.82.226 (27 Dec 2014 01:48:03 GMT) X-Complaints-To: news@jacob-sparre.dk NNTP-Posting-Date: Sat, 27 Dec 2014 01:48:03 +0000 (UTC) X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.5931 X-RFC2646: Format=Flowed; Original X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.6157 Xref: news.eternal-september.org comp.lang.ada:24242 Date: 2014-12-26T19:48:03-06:00 List-Id: "Tony" wrote in message news:4a5a3301-958b-41fd-9d1a-7ab35021daa0@googlegroups.com... > On Friday, December 26, 2014 4:56:16 PM UTC+1, Simon Clubley wrote: >> It would be interesting for the OP to run the binutils size command on >> both executables and post the results. > > OK, GNAT 3.15p: > C:\Tony\Ada_program\Tests>size hello.exe -A > hello.exe : > section size addr > .text 62428 4198400 > .data 2244 4263936 > .bss 21124 4268032 > .idata 2416 4292608 > Total 88212 > > GNAT 2014: > C:\Tony\Ada_program\Tests>size hello.exe -A > hello.exe : > section size addr > .text 133348 4198400 > .data 1092 4333568 > .rdata 15500 4337664 > .eh_fram 41432 4354048 > .bss 13892 4399104 > .idata 5112 4415488 > .CRT 52 4423680 > .tls 32 4427776 > Total 210460 As should be obvious, the tasking runtime for Ada 2005 and Ada 2012 is substantially more complex than that for Ada 95 alone. Since GNAT doesn't eliminate the tasking runtime (like Janus/Ada does), the program size is going to go up for every new Ada version (and probably every new compiler version, too). Even with Janus/Ada, the runtime tends to go up a bit with every version (more detailed messages for handling, additional capabilities for the heap, etc.) But that's all irrelevant unless you are targetting a very small embedded system. In which case, you'd be better off with a compiler that was designed to target very small systems (hint, hint :-). Otherwise, there is so much memory available, and so much of the newer capabilities that are probably used in a real system, that there really isn't any point in worrying about it. Now, if you have a reference set of programs that double in size, that might be relevant. (Lots of memory doesn't mean that it is completely free.) Otherwise, it matters about as much as the runtime performance on the old Byte Primes benchmark. Randy.