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=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,a30a877db63b60c0 X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news2.google.com!proxad.net!newsfeed.stueberl.de!news-mue1.dfn.de!news-ham1.dfn.de!news.uni-hamburg.de!cs.tu-berlin.de!uni-duisburg.de!not-for-mail From: Georg Bauhaus Newsgroups: comp.lang.ada Subject: Re: Hello World 217Kb ? Date: Tue, 23 Nov 2004 20:27:34 +0000 (UTC) Organization: GMUGHDU Message-ID: References: NNTP-Posting-Host: l1-hrz.uni-duisburg.de X-Trace: a1-hrz.uni-duisburg.de 1101241654 25771 134.91.1.34 (23 Nov 2004 20:27:34 GMT) X-Complaints-To: usenet@news.uni-duisburg.de NNTP-Posting-Date: Tue, 23 Nov 2004 20:27:34 +0000 (UTC) User-Agent: tin/1.5.8-20010221 ("Blue Water") (UNIX) (HP-UX/B.11.00 (9000/800)) Xref: g2news1.google.com comp.lang.ada:6393 Date: 2004-11-23T20:27:34+00:00 List-Id: stephane richard wrote: : : a whopping 217Kb (without debug information)...am I doing something wrong, : or is this the actual size of a basic exe file produced by Ada? when I use the same compiler for translating a function that returns an uninitialised integer variable, I get the following sizes (-O, -static, -gnato): Ada executable: ret_code C executable: a.out -rwxr-xr-x 1 georg staff 568326 Nov 23 21:13 ret_code -rwxr-xr-x 1 georg staff 471287 Nov 23 21:14 a.out shared linking gives -rwxr-xr-x 1 georg staff 17191 Nov 23 21:17 ret_code -rwxr-xr-x 1 georg staff 11938 Nov 23 21:17 a.out After running strip, I get -rwxr-xr-x 1 staff 486980 Nov 23 21:20 ret_code -rwxr-xr-x 1 staff 421552 Nov 23 21:20 a.out and -rwxr-xr-x 1 staff 5520 Nov 23 21:21 ret_code -rwxr-xr-x 1 staff 2856 Nov 23 21:21 a.out respectively. This is GCC 3.4.2. The difference in size seems to vary with compiler versions. For example, gcc 2.8.1 produces a smaller difference. with Interfaces.C; use Interfaces; function ret_code return C.int is uninitialised: C.int; begin return uninitialised; end ret_code; int main() { int uninitialised; return uninitialised; } -- Georg