Subject: RE: Smallest program
From: [email-masked] (Alessandro Forin)

5 Dec 1996 15:06:01 -0800
Sender: [email-masked]
Approved: [email-masked]
Distribution: cygnus
Message-ID: <c=US%a=_%p=msft%l=[email-masked]>
Original-To: "[email-masked]'" <[email-masked]>
X-Mailer: Microsoft Exchange Server Internet Mail Connector Version 4.0.994.63
Encoding: 63 TEXT
Original-Sender: [email-masked]

I merely forwarded the reply from the VC++ guys.
Since it seems to have caught some attention, here it is for all

>----------
>
>Sent: 	Wednesday, December 04, 1996 2:30 PM
>To: 	Alessandro Forin; Visual C++ Special Interest Group
>Subject: 	RE: Size of smallest program
>
>[ Thanks to <> for reminding me of the linker options - I knew they existed I
>just couldn't remember what they were ]
>
>	cl /O2 /MD /GF hello.c /link /optidata /merge:.rdata=.text
>
>Gives an .exe size of 2048 bytes
>
>-----Original Message-----
>
>Sent:	Wednesday, December 04, 1996 2:14 PM
>To:	Alessandro Forin; Visual C++ Special Interest Group
>Subject:	RE: Size of smallest program
>
>Compiling the same program with VC++ 5.0 with the following options
>	
>	cl /O2 /MD /GF hello.c
>
>generates a program of 3072 bytes - 1 page of .data, 1 page of .idata, 1 page
>of .rdata and 1 page of .text.
>

>----------
>From: 	[email-masked][SMTP:[email-masked]]
>Sent: 	Thursday, December 05, 1996 3:33 AM
>To: 	[email-masked]
>Subject: 	Re: Smallest program
>
>Thanks to all that replied.
>It seems, that MSVC wins again. What was very interesting is the option that
>allows the linker to MERGE two sections into one (sent by
>[email-masked])
>
>I was considering modifying my linker to do that, but the huge number of bugs
>that I could introduce, and the sheer difficulty of assuring a 100% correct
>result made me leave that for later... 
>
>As the size of the 'hello.exe' from MSVC, it seems that I was linking the
>MSVC
>library statically, so the size of the executable generated was much bigger
>than it should have been.
>
>gcc then, (using the minimalist version), achieves the same result (if I can
>find the 32 bytes I'm adding somwhere... :-)
>
>-- 
>Jacob Navia	Logiciels/Informatique
>41 rue Maurice Ravel			Tel 01 48.23.51.44
>93430 Villetaneuse 			Fax 01 48.23.95.39
>France
>-
>For help on using this list, send a message to
>"[email-masked]" with one line of text: "help".
>
-
For help on using this list, send a message to
"[email-masked]" with one line of text: "help".