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.9 required=5.0 tests=BAYES_00,FORGED_GMAIL_RCVD, FREEMAIL_FROM autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,93a8e26f233f1cde X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII Received: by 10.205.119.5 with SMTP id fs5mr350705bkc.7.1334354651892; Fri, 13 Apr 2012 15:04:11 -0700 (PDT) Path: h15ni120303bkw.0!nntp.google.com!news2.google.com!postnews.google.com!h4g2000yqj.googlegroups.com!not-for-mail From: Rugxulo Newsgroups: comp.lang.ada Subject: Re: Does Ada still competitive? Date: Fri, 13 Apr 2012 15:02:36 -0700 (PDT) Organization: http://groups.google.com Message-ID: <7b003084-2d25-49a4-8b22-72c80d742a2a@h4g2000yqj.googlegroups.com> References: <2667883.6.1334114293790.JavaMail.geo-discussion-forums@pblw1> <9131821d-9018-47ca-8739-17aa73fde8cc@m16g2000yqc.googlegroups.com> NNTP-Posting-Host: 65.13.115.246 Mime-Version: 1.0 X-Trace: posting.google.com 1334354651 22729 127.0.0.1 (13 Apr 2012 22:04:11 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Fri, 13 Apr 2012 22:04:11 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: h4g2000yqj.googlegroups.com; posting-host=65.13.115.246; posting-account=p5rsXQoAAAB8KPnVlgg9E_vlm2dvVhfO User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (X11; U; Linux i686; en-US) AppleWebKit/534.16 (KHTML, like Gecko) Chrome/10.0.630.0 Safari/534.16,gzip(gfe) Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Date: 2012-04-13T15:02:36-07:00 List-Id: Hi, On Apr 13, 8:15=A0am, Mark Lorenzen wrote: > > I won't comment on all your rambling, but focus on a feature of GNAT. > > On 13 Apr., 11:06, a...@att.net wrote: > > > Then later in the binder ("gnatbind") could remove any dead code from > > precompiled Ada library packages, while linking that package, unlike mo= st > > other linkers which just copy the dead code into the program. But in or= der > > to remove the dead code the binder ("gnatbind") would have to bypass ca= lling > > GCC linkers and preform the link/editing itself while removing the dead= code > > from the library packages. And course this removes the constant updatin= g > > of GNAT to every new version of GCC, which saves money and time. > > The GNU linker that is shipped with GNAT is perfectly able to remove > unused subprograms and unused data from the executable. See > http://docs.adacore.com/gnat-unw-docs/html/gnat_ugn_8.html#SEC103 This only works for ELF, I think. At least it doesn't work for DJGPP COFF. Maybe your point was that it does (sometimes) work and could work in all places, but that doesn't change the fact that it's not a universal solution, sadly. Perhaps the best workaround is just to put each subprogram in its own separate file, and put all those compiled objects into a library. I think others (FPC??) do similar on some targets. (And all the above is probably doing is putting each subprogram in its own named section in the object, stripping it at link time, e.g. XDS.)