[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lwip-devel] [bug #20254] Initializing static/global variables

From: Simon Goldschmidt
Subject: [lwip-devel] [bug #20254] Initializing static/global variables
Date: Tue, 26 Jun 2007 08:53:34 +0000
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; de; rv: Gecko/20070515 Firefox/

Follow-up Comment #6, bug #20254 (project lwip):

As far as I know (at least for gcc), initialized variables go into the data
or sdata section, which is present in the binary (initialized values are 'on
the disk'). In contrast, uninitialized variables (whether static or not) go
into the sbss section, which doesn't need to be located in the binary. There
only has to be information about how big that region is and the loader (in my
embedded case, a self-made init-code written in assembly) zeros this region on

Thus, we get a bigger text-section (more init code when initializing
everything to 0) but smaller data/sdata sections (which can be a huge benefit
if big arrays are left out)!


Reply to this item at:


  Nachricht geschickt von/durch Savannah

reply via email to

[Prev in Thread] Current Thread [Next in Thread]