vcc wastes disk space

Eric Norum eric at skatter.uucp
Tue Jan 31 07:13:29 AEST 1989


Reply-to: eric at skatter.uucp (Eric Norum)

Recompiling a bunch of stuff with DEC's `vcc' made our disk free
space disappear.

Problem:
	DEC's VAX C compiler seems intended to help DEC sell disk drives.
	Uninitialized static variables end up in the data segment instead
	of the bss segment.

Software:
	Tested on ULTRIX 2.2 and ULTRIX 2.3

Hardware:
	Tested on MicroVAX II and VAX-11/750
	Problem probably exists on all VAX machines.

Repeat-By:
	Compile the following program with `cc' and 'vcc':

	static int foo[30000];
	main ()
	{
		printf ("Hello world.\n");
	}

	Check the difference in size:

	% cc foo.c
	% size a.out
	text    data    bss     dec     hex
	4096    1024    119476  124596  1e6b4
	% ls -l a.out
	-rwxr-xr-x  1 eric         8192 Jan 24 08:28 a.out

	% vcc foo.c
	% size a.out
	text    data    bss     dec     hex
	4096    120832  0       124928  1e800
	% ls -l a.out
	-rwxr-xr-x  1 eric       127083 Jan 24 08:29 a.out

Fix:
	I am hoping someone out there can tell me.......
Eric Norum                            eric at skatter.USask.ca
Electrical Engineer
Accelerator Laboratory                  UUCP: ...!alberta!dvinci!skatter!eric
University of Saskatchewan            BITNET: NORUME at SASK



More information about the Comp.unix.ultrix mailing list