This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: bss section not getting zero-initialised vars


Geoff Keating wrote:
> In fact, I'm sure I've seen "int data_start = 0;" in some of the crt* files.
> 
> It's also used with libraries, when you want to make sure that a .o
> file does (or does not) get linked into the executable from a .a file.

Explain please?

> Also with shared libraries, because the linker will initialise a .bss
> variable with a value from a shared library, but won't initialise one
> in .data.

Aren't you thinking of common symbols, which end up in .bss but are
still common, as opposed to uncommon .bss symbols?

-- Jamie

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]