On Saturday 01 November 2003 21:01, Svetoslav Slavtchev wrote:
[...]
> OK
> so what options do we have to reduce the kernel/ initrd size ?
>
optimize compilation?
My initrd consists only of reiserfs. Compare:
{pts/2}% l -s /boot/initrd-2.6.0-test9.img
992 /boot/initrd-2.6.0-test9.img
{pts/2}% l -s /boot/initrd-2.4.23-pre8.img
340 /boot/initrd-2.4.23-pre8.img
That is not code bloat - code size increased only marginally:
{pts/2}% size linux-2.6.0-test9/fs/reiserfs/reiserfs.ko
text data bss dec hex filename
218292 1400 6644 226336 37420
linux-2.6.0-test9/fs/reiserfs/reiserfs.ko
{pts/2}% size linux-2.4.23-pre8/fs/reiserfs/reiserfs.o
text data bss dec hex filename
180287 1028 6612 187927 2de17
linux-2.4.23-pre8/fs/reiserfs/reiserfs.o
but file size increased dramatically:
{pts/2}% ls -s linux-2.6.0-test9/fs/reiserfs/reiserfs.ko
2612 linux-2.6.0-test9/fs/reiserfs/reiserfs.ko
{pts/2}% ls -s linux-2.4.23-pre8/fs/reiserfs/reiserfs.o
232 linux-2.4.23-pre8/fs/reiserfs/reiserfs.o
take separate files, extreme example is super.o:
{pts/2}% size linux-2.6.0-test9/fs/reiserfs/super.o
text data bss dec hex filename
15766 448 4 16218 3f5a linux-2.6.0-test9/fs/reiserfs/super.o
{pts/2}% size linux-2.4.23-pre8/fs/reiserfs/super.o
text data bss dec hex filename
14520 108 0 14628 3924 linux-2.4.23-pre8/fs/reiserfs/super.o
{pts/2}% ls -s linux-2.6.0-test9/fs/reiserfs/super.o
180 linux-2.6.0-test9/fs/reiserfs/super.o
{pts/2}% ls -s linux-2.4.23-pre8/fs/reiserfs/super.o
24 linux-2.4.23-pre8/fs/reiserfs/super.o
apparently it is symbol table size. My knowledge of GCC internals is not as
good as it was ten years ago so I do not know why it happens and how to
change it.
> bzip compression? (last time i loocked the patches were against 2.5.59 :( )
> compile with Os ?
>
it is not object size :) You do not need to optimize code, you simply has to
remove all this (redundant? superfluous?) symbol table entries.
Well, I have all debugging options enabled it may have something to do with it
of course.
-andrey