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



On Tuesday 03 November 2009, JJ wrote:
> So as long as I don't expect unintialized global and statically
> allocated variables to be 0, I'm fine?

Maybe. 

However given the amount of effort required to clear .bss (a few lines of 
assembly), and the potential consequences of failing to do so (subtle, hard to 
trace failures on a production system), I strongly recommend that you 
implement this properly.  Current or future versions of the compiler and/or 
runtime libraries may assume that zero initialized variables work correctly.  
If your startup code fails to ensure a clear .bss then you're entirely on your 
own.


Paul