lwip-devel
[Top][All Lists]
Advanced

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

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


From: Julian Gardner [RSD]
Subject: RE: [lwip-devel] [bug #20254] Initializing static/global variables
Date: Tue, 26 Jun 2007 10:07:07 +0100

Can we leave this out, trying to code around BROKEN compilers is BAD!!!



-----Original Message-----
From: address@hidden
[mailto:address@hidden On Behalf Of Simon
Goldschmidt
Sent: 26 June 2007 09:54
To: Kieran Mansley; Simon Goldschmidt; Thomas Taranowski; Petr Cernin;
address@hidden
Subject: [lwip-devel] [bug #20254] Initializing static/global variables


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/



_______________________________________________
lwip-devel mailing list
address@hidden
http://lists.nongnu.org/mailman/listinfo/lwip-devel




reply via email to

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