From: secsu@ariel.lerc.nasa.gov (Ralph O. Clark) Subject: Re: why are my executables so big? Date: 10 Feb 1993 14:24 EST
In article <10FEB199311271256@ariel.lerc.nasa.gov>, secsu@ariel.lerc.nasa.gov (Ralph O. Clark) writes...
>I am running Linux 0.99pl4 (the SLS dist.) with GCC 2.3.3 as supplied in
>the 'c' series (downloaded around Feb 1). Just for practice, I have also
>downloaded sources to some of the standard utilities. I have noticed that
>whatever I compile tends to come out larger than the distributed binaries.
>I compile with the -O2 flag and strings(1) shows the strings 'libc.so.4'
>and 'Jump table 4.2'. Still, even after 'strip foo', the executable
>is still twice the size of comparable SLS binaries. What's the magic
>incantation I'm forgetting here?
>
>Other than that, Linux is great!
>
>Ralph
Boy, talk about quick turn-around! Since posting this this morning, I
have received 1 email requesting that I share the responses, and 3 emails
suggesting that I use the -N option in compiling/loading. This does indeed
shrink the size of the executable by not padding segments out to multiples
of 4K bytes. The downside is that such an executable is no longer
demand-pageable, so you only want to do this on fairly small programs.
Now that that is solved, how come so many people know about the '-N'
option when it is not in the man pages or the .info files for gld or gcc?
Ralph