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=-0.3 required=5.0 tests=BAYES_00, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,db8388c6b42d398 X-Google-Attributes: gid103376,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news2.google.com!news.glorb.com!news2.glorb.com!wn14feed!worldnet.att.net!bgtnsc04-news.ops.worldnet.att.net.POSTED!53ab2750!not-for-mail Newsgroups: comp.lang.ada From: anon@anon.org (anon) Subject: Re: How do I go about creating a minimal GNAT runtime? Reply-To: no to spamers (No@email.given.org) References: X-Newsreader: IBM NewsReader/2 2.0 Message-ID: Date: Sun, 01 Mar 2009 19:13:53 GMT NNTP-Posting-Host: 12.65.216.228 X-Complaints-To: abuse@worldnet.att.net X-Trace: bgtnsc04-news.ops.worldnet.att.net 1235934833 12.65.216.228 (Sun, 01 Mar 2009 19:13:53 GMT) NNTP-Posting-Date: Sun, 01 Mar 2009 19:13:53 GMT Organization: AT&T Worldnet Xref: g2news1.google.com comp.lang.ada:3865 Date: 2009-03-01T19:13:53+00:00 List-Id: You need to understand what this person means by "minimal GNAT runtime" system. From his web site, he means no Linux, Windows or other OS, aka the Ada program is the OS and all libraries must be static. That is, until he creates a dynamic or shared library loader, but that means he first must build a storage device driver with a file system. A problem with GNAT and this design is that GNAT uses around 50 packages to build and maintain the Exceptions with the compiler forcing a number of these packages to be loaded. And some of these packages uses C files which uses the C "os_exit" and "abort" routines (OS based) to handle the unhanded exceptions which these files must be converted to Ada and the OS links be replaced. And some of these C files can exceed 4,000 lines of code with comments. Also, if your talking about the GNAT Ada RTL well there are over 650 packages in the Ada 2005 version that one has to check and may have to be rewrite just to take out the OS links. That around 400K for Ada 95, a lot more for the Ada 2005 specs of source code without comments to go through as stateed in some runtime documentation that is around. Then you have to add some code to handle the hardware exceptions that's normally deal with by the OS. All of this means it a big job. This could help to explain why Adacores charges $15K per years for someone to get those special runtime system with GNAT PRO series. In , Dimonax writes: >On Fri, 27 Feb 2009 17:42:17 -0600, Randy Brukardt wrote: > >> For Windows, things are bigger, but not that much. I see a 70K >> executable for a simple test program left behind in one of my test >> directories. That program uses Text_IO but not any tasking (tasking is >> automatically omitted from the executable if not used). The tasking >> runtime would push the size up to (I think) about 150K. >> >> Randy. > >The easiest way to knock down the size of an Ada binary, that I know of, >is just to use shared libraries instead of static linking. Of course that >isnt always an option, but on systems where its supported you might want >to give it a try. > >Dimonax >