Re: PCI Express support for 2.4 kernel

Tomas Szepe
2003-12-15T17:10:29Z

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>