Uninitialized global data (was Re: Global variables)

Raymond Juimong Chen rjchen at phoenix.Princeton.EDU
Wed Feb 17 03:28:27 AEST 1988


To get back to the original question (do we ever do that here?)

>From someone whose attribution has since vanished:
>The manual seems to indicate that only initialized global
>data  will  go  here,  but  isn't  all  global   data  implicitly
>initialized to zero if not otherwise specified?

I believe that global data initialized to zero go into a special
segment called "bss".  What it stands for is beyond me.  What it means
is (I think) that when the program is loaded, the loader allocates
the requisite amount of space and initializes it to zero at runtime.

This is meant to save space in the executable.

Corrections welcomed.  flames slightly less so.

-- 
Raymond Chen	UUCP: ...allegra!princeton!{phoenix|pucc}!rjchen
		BITNET: rjchen at phoenix.UUCP, rjchen at pucc
		ARPA: rjchen at phoenix.PRINCETON.EDU
"Say something, please!  ('Yes' would be best.)" - The Doctor



More information about the Comp.lang.c mailing list