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,FREEMAIL_FROM autolearn=unavailable autolearn_force=no version=3.4.4 X-Received: by 2002:a6b:c681:: with SMTP id w123-v6mr2128848iof.14.1540546768309; Fri, 26 Oct 2018 02:39:28 -0700 (PDT) X-Received: by 2002:aca:3f86:: with SMTP id m128-v6mr29195oia.1.1540546767958; Fri, 26 Oct 2018 02:39:27 -0700 (PDT) Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!feeder.eternal-september.org!news.uzoreto.com!newsreader4.netcologne.de!news.netcologne.de!peer03.ams1!peer.ams1.xlned.com!news.xlned.com!peer01.fr7!futter-mich.highwinds-media.com!peer01.iad!feed-me.highwinds-media.com!news.highwinds-media.com!z5-v6no38262ite.0!news-out.google.com!n199-v6ni52itn.0!nntp.google.com!z5-v6no38260ite.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Fri, 26 Oct 2018 02:39:27 -0700 (PDT) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=57.79.21.10; posting-account=gRqrnQkAAAAC_02ynnhqGk1VRQlve6ZG NNTP-Posting-Host: 57.79.21.10 References: <5fb88cf6-47da-4c28-a660-9ddf06522b12@googlegroups.com> <5b897611-5e95-4bc8-b5b9-a8df97299cd6@googlegroups.com> <61c2515d-29fd-4b96-8138-88d7f5419fb5@googlegroups.com> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: Subject: Re: Ada interacting with Windows 8.1+ GUI From: gautier_niouzes@hotmail.com Injection-Date: Fri, 26 Oct 2018 09:39:28 +0000 Content-Type: text/plain; charset="UTF-8" X-Received-Bytes: 2464 X-Received-Body-CRC: 2143765929 Xref: reader02.eternal-september.org comp.lang.ada:54714 Date: 2018-10-26T02:39:27-07:00 List-Id: Am Freitag, 26. Oktober 2018 11:19:24 UTC+2 schrieb Simon Wright: > You can compile with -ffunction-sections -fdata-sections which say each > subprogram/data object resp. is to have its own section. If your linker > supports (the equivalent of) -gc-sections. linking with it means that > only the used sections get linked. This is fine for (arm-eabi) embedded > systems & (probably) Linux. which use GNU ld, but not on macOS. Can't > say for Windows. It does something visible in terms of executable size. > GNAT provides gnatelim, which analyses your code and (?) regenerates it > without the unused objects. No idea how well this works. gnatelim produces a file with a list of pragmata like: pragma Eliminate (Zip, Traverse, Source_Location => "zip.adb:514"); On the next build GNAT will see the subprogram's code as blank lines. gnatelim reduces further the executable size (on Windows; which means that -gc-sections is not fully efficient). The downside is that the list is quickly outdated, you need to rebuild it often.