Messages in this thread | | | Subject | Re: Minimizing the Kernel | From | Valdis.Kletnieks@vt ... | Date | Wed, 24 Sep 2003 14:21:09 -0400 |
| |
On Wed, 24 Sep 2003 19:13:28 +0200, Maciej Soltysiak said: > > Well for starters dont use gcc 3 or above.. code size has increased > > dramatically with thoose versions. sure they give you more optimization > Hmm, has anyone tried -Os with gcc3+ ? > Maybe that'd be good for size optimization?
I've usually been compiling with -Os on gcc3 for a while, works for me.
% size */vmlinux text data bss dec hex filename 3034134 620847 224824 3879805 3b337d linux-2.6.0-test4-mm6/vmlinux 3476451 621246 227512 4325209 41ff59 linux-2.6.0-test5-mm2/vmlinux 3034632 622210 226360 3883202 3b40c2 linux-2.6.0-test5-mm3/vmlinux 3037706 623409 226360 3887475 3b5173 linux-2.6.0-test5-mm4/vmlinux
-mm6, -mm3, and -mm4 were compiled with -Os, -mm2 with -O2. All with gcc 3.3.1 from RedHat Rawhide. Given how close -mm6, -mm3, and -mm4 are in size, the 12% or so size saving is almost certainly the efects of -Os rather than changes in the size of the code. I could rebuild any of them to get an exact number, but it would take a while on this laptop....
[unhandled content-type:application/pgp-signature] | |