lwip-devel
[Top][All Lists]
Advanced

[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:1.8.1.4) Gecko/20070515 Firefox/2.0.0.4

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
booting.

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:

  <http://savannah.nongnu.org/bugs/?20254>

_______________________________________________
  Nachricht geschickt von/durch Savannah
  http://savannah.nongnu.org/





reply via email to

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