Re: [arm-gnu] zeroing out the .bss area
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [arm-gnu] zeroing out the .bss area
- To: Mark Deneen <mdeneen+arm@xxxxxxxxxxxxxx>
- Subject: Re: [arm-gnu] zeroing out the .bss area
- From: JJ <alchemistmba@xxxxxxxxx>
- Date: Tue, 3 Nov 2009 13:47:11 -0800
So as long as I don't expect unintialized global and statically
allocated variables to be 0, I'm fine?
JJ
On Tue, Nov 3, 2009 at 1:03 PM, Mark Deneen <mdeneen+arm@xxxxxxxxxxxxxx> wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Mark Mitchell wrote:
>> JJ wrote:
>>
>>> Why is it necessary to zero out the .bss?
>>
>> Because .bss is by definition zero-initialized memory. Something
>> has to zero it.
>>
>>> I can't use the CS3 framework because I'm not using one of the
>>> supported boards.
>>
>> CS3 is designed to allow you to replace some parts without other
>> parts; you don't have to have a supported board. Refer to the
>> Getting Started Guide for more information.
>>
>
> I've skipped initializing .bss in boot loaders to save space in
> flash. You can't make any assumptions about initial values being
> zero, though. Once the boot loader jumps to the main program, his
> _start takes care of .bss.
>
> Mark
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.7 (MingW32)
>
> iD8DBQFK8JqJtf95hArmCUURAjBLAJ9Zh5FkZQOQN050Ahr7SR3R70iiEgCeINmU
> 6u4hsCQmvoFRPfFTvaHylTY=
> =8hUp
> -----END PGP SIGNATURE-----
>
>