From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on ip-172-31-74-118.ec2.internal X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=unavailable autolearn_force=no version=3.4.4 Path: eternal-september.org!reader01.eternal-september.org!feeder.eternal-september.org!nntp-feed.chiark.greenend.org.uk!ewrotcd!newsfeed.xs3.de!news.jacob-sparre.dk!franka.jacob-sparre.dk!pnx.dk!.POSTED.rrsoftware.com!not-for-mail From: "Randy Brukardt" Newsgroups: comp.lang.ada Subject: Re: How can I get this data into the .data section of the binary? Date: Sat, 20 Jun 2020 22:55:37 -0500 Organization: JSA Research & Innovation Message-ID: References: Injection-Date: Sun, 21 Jun 2020 03:55:39 -0000 (UTC) Injection-Info: franka.jacob-sparre.dk; posting-host="rrsoftware.com:24.196.82.226"; logging-data="15207"; mail-complaints-to="news@jacob-sparre.dk" X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.5931 X-RFC2646: Format=Flowed; Response X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.7246 Xref: reader01.eternal-september.org comp.lang.ada:59135 List-Id: "Niklas Holsti" wrote in message news:hl0s14FsgcgU1@mid.individual.net... > On 2020-06-18 5:55, Randy Brukardt wrote: ... >> The better question is why you care? > > > [snip] > >> (The situation can be different on a bare machine, of course.) > > ... > For my case of the large constant array, we needed to save RAM space, and > did not want to spend RAM _both_ for the elaboration code that initialized > the array (larger than the array itself) and for the array. I suppose it would depend on the declaration of the array, but I would not expect that to be the case most of the time. Typically, one can initialize most Ada data types with a block-copy, which would only be a handful of bytes on most target machines. Of course, if you have lots of controlled types and tasks, you'd have issues, but those aren't preelaborable anyway (some code would need to be executed for them). That's the sort of thing that having a good relationship with your compiler vendor can help with, since it often wouldn't take much tweaking to eliminate expensive elaboration code. (It's not something I pay much attention to unless a customer asks...) Randy.