automatic initialization to 0

Guy Harris guy at rlgvax.UUCP
Sun Jul 17 18:37:34 AEST 1983

Bell is considering an addition to C to permit specification of sharable
read-only data vs. non-shared read/write data (to get shared read/write
data, use the shm* system calls in UNIX 5.0 - System V - or whatever will
appear in 4.2BSD), which will solve the problem much more cleanly than it
is being solved now, namely by running selected source modules through an
"sed" script that turns ".data" into ".text".

As for a micro-based application not clearing out ".bss", the method used
by the UNIX kernel, you're right; any C implementation running stand-alone
should have a C startup routine which cleans out "bss" (a little tricky if
your linker won't provide the start of BSS and the end of BSS as globals,
as the UNIX one does) and calls "main".

	Guy Harris

More information about the Comp.lang.c mailing list