comp.lang.ada
 help / color / mirror / Atom feed
From: Niklas Holsti <nholsti@icon.fi>
Subject: Re: Initialized global data
Date: 1998/05/09
Date: 1998-05-09T00:00:00+00:00	[thread overview]
Message-ID: <3554A383.3F369AD1@icon.fi> (raw)
In-Reply-To: 6iosc2$3mp@bgtnsc01.worldnet.att.net


Kevin Wells wrote:
> 
> When specifying data in an Ada package that is pre-initialized such as
> ----------------------------------------
> package Generate_Matrix is
>   Scale_Factor : float := 10.903;
>   .
> end Generate_Matrix; -- spec
> ----------------------------------------
> 
> 1. Is it normal for the compiler to generate code that sets the value in
> memory
>     (that gets executed when the runtime system is initialized)?
> 2. Is there a way to get around this?


In the compiler we have used most (TLD Ada 83, cross from Solaris to
1750A)
there are a couple of compiler switches (-xtra -static_init) that can
be used to eliminate the initialization code, in favour of data placed
in the memory image for direct loading. Works only for _scalar_
variables
though. The same is automatic for all _constants_, as far as I know.

I know that you are using a different compiler, but perhaps a recheck
of the available compiler options would turn up something -- probably
you have already checked.

Niklas Holsti
Space Systems Finland




      parent reply	other threads:[~1998-05-09  0:00 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1998-05-05  0:00 Initialized global data Kevin Wells
1998-05-05  0:00 ` A little more data Kevin Wells
1998-05-06  0:00   ` Stephen Leake
1998-05-06  0:00 ` Initialized global data Tucker Taft
1998-05-06  0:00 ` Anonymous
1998-05-08  0:00   ` Simon Wright
1998-05-08  0:00     ` Tucker Taft
1998-05-09  0:00       ` Simon Wright
1998-05-10  0:00         ` Robert Dewar
1998-05-11  0:00           ` Simon Wright
1998-05-11  0:00             ` Matthew Heaney
1998-05-06  0:00 ` John English
1998-05-09  0:00 ` Niklas Holsti [this message]
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox