[lkml]   [2003]   [Sep]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    SubjectRe: Minimizing the Kernel
    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]
     \ /
      Last update: 2005-03-22 13:48    [W:0.020 / U:7.588 seconds]
    ©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site