Initialization of .BSS question.

Joe Huffman joe at proto.COM
Thu Jun 28 09:27:02 AEST 1990

I am porting the runtime library from a MSDOS compiler to UNIX.  Under
SCO UNIX (first target) the .BSS segment is initialized to all 0's by
the OS (at least prior to the application code getting control).  Under
MSDOS this was the responsiblity of the startup code.  I currently have
it removed from the UNIX version but was a bit concerned that under some
versions of UNIX it may be necessary to include it.  As other discussions
have pointed out, it would be a security hole if it were to be left as
garbage from other programs.  But it could be initialized to something
other than 0, assuming that it was the runtime libraries responsibilty to
set it to 0.

The question is:  Are there existing/going-to-be any i386 UNIX's that do not 
initialize the .BSS section to 0?

Email is fine, I don't think this is of particularly wide interest...


joe at
FAX: 208-263-8772

More information about the Comp.unix.i386 mailing list