Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!watmath!clyde!burl!ulysses!allegra!mit-eddie!genrad!decvax!ittatc!dcdwest!sdcsvax!ncr-sd!hp-sdd!hplabs!oliveb!3comvax!mykes From: mykes@3comvax.UUCP (Mike Schwartz) Newsgroups: net.micro.amiga Subject: Re: printf does not take 10K Message-ID: <556@3comvax.UUCP> Date: Wed, 25-Jun-86 13:29:49 EDT Article-I.D.: 3comvax.556 Posted: Wed Jun 25 13:29:49 1986 Date-Received: Sat, 28-Jun-86 05:22:50 EDT References: <8606242147.AA12273@pavepaws> Reply-To: mykes@3comvax.UUCP (Mike Schwartz) Organization: 3Com Corp; Mountain View, CA Lines: 30 In article <8606242147.AA12273@pavepaws> dillon@PAVEPAWS.BERKELEY.EDU (Matt Dillon) writes: > >difference = 560 bytes. Now this makes you wonder what the hell lattice >has got in their startup that would create a 13896 byte executable for a >null program. > >---------------- OK, so why does Lattice generate such large programs? Well, the answer is simple, and it sux having to deal with it by going around it, but... As far as I've seen, Lattice on the Amiga is a simple port of Lattice on the PC. Lattice prides themselves on the fact that they have all this portable stuff (I prefer libraries customized for the target machine, but when you want portability...). Lattice 'C' on the PC has the same problem with huge libraries. The cause is in their c.c, or startup.obj module. You see, they call exit() after the user main() returns, and exit() references a lot of other library routines that get dragged in and waste space. After using Manx for 5 months, I would bet that Lattice's code generation can't be any worse than the code generated with Manx's +L option. If some adventuresome soul wants to try and do something about it, there is a #define that Lattice uses in c.c called TINYMAIN, which is supposed to make smaller programs, but I'm pretty sure that even with TINYMAIN, exit() is called and programs are still inflated with a bunch of junk that is not needed. I hear that by mucking with c.c, it is possible to get decent sized compiled programs, but I have not spent the time to see what it would take on the Amiga version of Lattice. Good luck!