Path: utzoo!utgpu!news-server.csri.toronto.edu!rutgers!ucsd!sdd.hp.com!wuarchive!cs.utexas.edu!ut-emx!perv.pe.utexas.edu!pefv700 From: pefv700@perv.pe.utexas.edu Newsgroups: comp.unix.questions Subject: size of executables Message-ID: <40449@ut-emx.uucp> Date: 30 Nov 90 18:40:57 GMT Sender: news@ut-emx.uucp Distribution: usa Organization: Dept. of Petroleum Engineering, The University of Texas at Aust Lines: 25 I am trying to write my own version of cat(1) in C. When I use default options for cc(1) (and those of ld(1)), for smallish programs, the executable size is always 24576 bytes. The only way I have found to reduce that is strip(1), which reduces the size to 16384 bytes. By comparison, /bin/cat is only 6312 bytes. I am using SunOS 4.? and have RTM but the options that deal with size (-S for cc and -x and -X for ld -- of course -s for cc is the same as strip) don't change anything. Even a program which does nothing is 24576 bytes: skelly% cat nothing.c main() { } skelly% cc nothing.c skelly% ls -l a.out -rwx------ 1 pefv700 24576 Nov 30 11:29 a.out What am I missing? +-------------------------------+--------------------------------------------+ | Christopher Phillips | #include "stupid_UNIX_quotes.h" | | pefv700@skelly.pe.utexas.edu | When in doubt, push pawn. | +-------------------------------+--------------------------------------------+