[okl4-developer] Iguana and BSS
Guillaume PETITJEAN
guillaume.petitjean at st.com
Thu Jul 17 17:36:13 EST 2008
I don't find it very logical. But I've found the explanation on ARM
web site:
"A new optimization has been added to the RVCT 2.1 and later
compilers, where small global ZI data items (<= 8 bytes) are now
placed by default into an RW data section, not ZI as in earlier
releases. For example:
int global; /* ZI (.bss) in RVCT 2.0.1 and earlier */
/* RW (.data) in RVCT 2.1 and later */
The benefit of this optimization is that it offers the compiler the
opportunity to save on the number of base pointer registers needed to
access global data, therefore freeing up valuable processor registers
for other purposes, and consequently saving on ROM size (especially if
RW data compression is active), as well as offering improved code
performance."
So it's not a matter of explicitely initialize variables. In theory it
should be in ZI data, except with the optimization above.
Geoffrey Lee wrote:
> On Wed, Jul 16, 2008 at 05:01:41PM +0200, Guillaume PETITJEAN
> wrote:
>> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
>>
>> We have a global static variable initialized explicitely to zero
>> in the application code that is not in the bss section (ZI with
>> RVCT) but in the data section (RW).
>>
>> Is it normal ?
>
> Yes, since you have explicitly initialized to zero.
>
> -gl
>
More information about the Developer
mailing list