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-7-bit Path: g2news2.google.com!news3.google.com!feeder1-2.proxad.net!proxad.net!feeder1-1.proxad.net!club-internet.fr!feedme-small.clubint.net!nuzba.szn.dk!news.jacob-sparre.dk!pnx.dk!not-for-mail From: "Randy Brukardt" Newsgroups: comp.lang.ada Subject: Re: Typical handling of packages through compilers Date: Fri, 14 Aug 2009 17:06:07 -0500 Organization: Jacob Sparre Andersen Message-ID: References: <3ca6c026-9269-4228-be95-1b7d6adf6131@h11g2000yqb.googlegroups.com> NNTP-Posting-Host: static-69-95-181-76.mad.choiceone.net X-Trace: munin.nbi.dk 1250287635 1495 69.95.181.76 (14 Aug 2009 22:07:15 GMT) X-Complaints-To: news@jacob-sparre.dk NNTP-Posting-Date: Fri, 14 Aug 2009 22:07:15 +0000 (UTC) X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.5512 X-RFC2646: Format=Flowed; Original X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5579 Xref: g2news2.google.com comp.lang.ada:7802 Date: 2009-08-14T17:06:07-05:00 List-Id: wrote in message news:h47rgp$c9a$1@aioe.org... >> It's the lack of a proper smart linking in the GNU linker. This >> technique is in use since more than 20 years in other systems - e.g.: >> Turbo Pascal and, later, Delphi. It seems also that Janus has it (or >> at least an old version had it). > Janus has smart linking. Janus Ada started life on DOS machines, where > size mattered. But Randy can tell you more. There's not a lot more to say, it works rather as Adam had explained. Each top-level subprogram is included independently, depending on whether or not it is referenced. We do that recursively, so that subprograms that are referenced only by routines that are not referenced also are not included. We also have a mechanism for determining whether a routine present in a tag can actually be referenced from a dispatching call or not. These techniques can make a lot of difference in extreme cases: Claw example programs can be reduced by more than 500K in executable size. Randy.