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: a07f3367d7,cb9e1ed8412da744 X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII Path: g2news2.google.com!news1.google.com!border1.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!cyclone1.gnilink.net!spamkiller.gnilink.net!gnilink.net!nwrddc01.gnilink.net.POSTED!c9e1c1fe!not-for-mail From: Jeffrey Creem User-Agent: Thunderbird 2.0.0.22 (Windows/20090605) MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: Typical handling of packages through compilers References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit Message-ID: Date: Wed, 22 Jul 2009 23:15:07 GMT NNTP-Posting-Host: 71.168.109.146 X-Complaints-To: abuse@verizon.net X-Trace: nwrddc01.gnilink.net 1248304507 71.168.109.146 (Wed, 22 Jul 2009 19:15:07 EDT) NNTP-Posting-Date: Wed, 22 Jul 2009 19:15:07 EDT Xref: g2news2.google.com comp.lang.ada:7284 X-Original-Bytes: 2561 Date: 2009-07-22T23:15:07+00:00 List-Id: Hibou57 (Yannick Duch�ne) wrote: > Hi all, > > I've noticed that the inclusion of a package, turns into the inclusion > of all of its content, despite just a few part of it is really used > (taking into account, internal dependencies). Using seperate data and > function sections and then the linker gc-section option, does not > change anything (the executable is even a bit bigger using these > options). > > There is indeed no implementation requirement about it. > > But I would like to know more on the handling of package through > various Ada compilers (including Janus if possible, if there are some > Janus users in the place). > > By the way, on most compilers, is an inner package handled the same > way a child package is ? I mean... child packages are included only > when withed, but what about inner packages ? Are they tipically > included in whole as there are part of another package body or are > they tipically included only when explicitely referenced (althought > inner packages does not need to be withed) ? > > Thanks for feed-backs > > > P.S. I know GNAT is very famous and widely used, but as it is also > very expensive (for most of people), it would be nice to have feed- > back about other compilers, not only GNAT. A few data other non gnat data points Most old Ada 83 Verdix (Then Rational) VADS compilers did smart linking (at least for vxWorks targets). Greenhills Ada does it on some platforms (interestingly enough, does not really seem to work for vxWorks targets but I also gave up a bit early)