lkml.org 
[lkml]   [2003]   [Dec]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: PCI Express support for 2.4 kernel
On Dec-15 2003, Mon, 11:55 -0500
Richard B. Johnson <root@chaos.analogic.com> wrote:

> Easy way to remember is that if you have either a static or a global
> variable that is initialized, it will be in the .data segment and,
> therefore take up space in the executable. If it is not initialized,
> it will be in the .bss segment, automatically zeroed by the loader.
> In this case, the executable contains length information, not the data.
> Local variables are never initialized unless there's an '=' in the
> code.

I think you guys are all missing Vladimir's point, which is that gcc
is able to detect that an explicit initialization of a static variable
happens to be to the value of ZERO, and place the variable in .bss
_in spite of the initialization_.

--
Tomas Szepe <szepe@pinerecords.com>
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:59    [from the cache]
©2003-2011 Jasper Spaans