Skip to contentSkip to conversation

Why are 2.6 modules so huge?

DISCUSSION Ian Soboroff 7 participants 9 messages Feb 24, 2004 – Feb 25, 2004

lore
Share & tools
lore
#0 lore raw

Can anyone help me understand why 2.6-series kernel modules are so huge?

$ cd /lib/modules
$ ls -l */kernel/fs/vfat
2.4.20-18.8bigmem/kernel/fs/vfat:
total 20
-rw-r--r--    1 root     root        17678 May 29  2003 vfat.o

2.4.23-xfs/kernel/fs/vfat:
total 20
-rw-r--r-- 1 root root 17614 Dec 3 18:04 vfat.o

2.6.0/kernel/fs/vfat:
total 288
-rw-r--r-- 1 root root 288738 Feb 11 16:47 vfat.ko

2.6.3/kernel/fs/vfat:
total 288
-rw-r--r-- 1 root root 289086 Feb 24 10:09 vfat.ko

Ian

#1 lore raw
Quoted 2 lines · Ian Soboroff

Can anyone help me understand why 2.6-series kernel modules are so huge?

Debuging symbols?

Regards,
Norberto

#2 lore raw
In reply to Ian Soboroff
Quoted 6 lines · Ian Soboroff

Can anyone help me understand why 2.6-series kernel modules are so huge?

2.6.3/kernel/fs/vfat:
total 288
-rw-r--r-- 1 root root 289086 Feb 24 10:09 vfat.ko

My 2.6.3 vfat.ko is 15365 bytes. Maybe you enabled kernel debugging symbols.

Signature · 2 lines
Måns Rullgård
[email protected]
#3 lore raw
Quoted 4 lines · Måns Rullgård

My 2.6.3 vfat.ko is 15365 bytes. Maybe you enabled kernel debugging symbols.

% ll /lib/modules/2.6.3/kernel/fs/vfat/
total 16
-rw-r--r-- 1 root root 14232 Feb 19 07:43 vfat.ko

Assuming that you are on i686:

A size difference of 1 KByte (about 7%) is remarkable. Which gcc did you use for building 2.6.3?

I am on Debian (Sid). Gcc is 3.3.3, which was released a few days ago.

Regards

Harri

#4 lore raw
Quoted 5 lines · Harald Dunkel
Quoted 3 lines · Måns Rullgård

My 2.6.3 vfat.ko is 15365 bytes. Maybe you enabled kernel debugging symbols.

Quoted 8 lines

% ll /lib/modules/2.6.3/kernel/fs/vfat/
total 16
-rw-r--r-- 1 root root 14232 Feb 19 07:43 vfat.ko

Assuming that you are on i686:

A size difference of 1 KByte (about 7%) is remarkable. Which gcc did you use for building 2.6.3?

I used gcc 3.3.2. Here's an objdump -h of that file:

/lib/modules/2.6.3/kernel/fs/vfat/vfat.ko: file format elf32-i386

Sections:

Idx Name          Size      VMA       LMA       File off  Algn
  0 .text         0000209c  00000000  00000000  00000034  2**2

CONTENTS, ALLOC, LOAD, RELOC, READONLY, CODE
1 .init.text 00000013 00000000 00000000 000020d0 2**0
CONTENTS, ALLOC, LOAD, RELOC, READONLY, CODE
2 .exit.text 00000013 00000000 00000000 000020e3 2**0
CONTENTS, ALLOC, LOAD, RELOC, READONLY, CODE
3 .rodata.str1.1 0000004c 00000000 00000000 000020f6 2**0
CONTENTS, ALLOC, LOAD, READONLY, DATA
4 .rodata.str1.32 00000073 00000000 00000000 00002160 2**5
CONTENTS, ALLOC, LOAD, READONLY, DATA
5 __ksymtab_strings 00000046 00000000 00000000 000021d3 2**0
CONTENTS, ALLOC, LOAD, READONLY, DATA
6 __ksymtab 00000030 00000000 00000000 0000221c 2**2
CONTENTS, ALLOC, LOAD, RELOC, READONLY, DATA
7 .modinfo 00000059 00000000 00000000 00002260 2**5
CONTENTS, ALLOC, LOAD, READONLY, DATA
8 .data 00000120 00000000 00000000 000022c0 2**5
CONTENTS, ALLOC, LOAD, RELOC, DATA
9 .gnu.linkonce.this_module 00000200 00000000 00000000 00002400 2**7
CONTENTS, ALLOC, LOAD, RELOC, DATA, LINK_ONCE_DISCARD
10 .bss 00000000 00000000 00000000 00002600 2**2
ALLOC
11 .comment 00000036 00000000 00000000 00002600 2**0
CONTENTS, READONLY

Signature · 2 lines
Måns Rullgård
[email protected]
#5 lore raw
In reply to Ian Soboroff
Quoted 17 lines · Ian Soboroff

Can anyone help me understand why 2.6-series kernel modules are so huge?

$ cd /lib/modules
$ ls -l */kernel/fs/vfat
2.4.20-18.8bigmem/kernel/fs/vfat:
total 20
-rw-r--r--    1 root     root        17678 May 29  2003 vfat.o

2.4.23-xfs/kernel/fs/vfat:
total 20
-rw-r--r-- 1 root root 17614 Dec 3 18:04 vfat.o

2.6.0/kernel/fs/vfat:
total 288
-rw-r--r-- 1 root root 288738 Feb 11 16:47 vfat.ko

Quoted 6 lines

2.6.3/kernel/fs/vfat:
total 288
-rw-r--r-- 1 root root 289086 Feb 24 10:09 vfat.ko

Ian

You probably have debugging config options enabled (ie CONFIG_DEBUG_INFO).

--
Brian Gerst

#6 lore raw
Quoted 3 lines · Brian Gerst

You probably have debugging config options enabled (ie CONFIG_DEBUG_INFO).

Duh. Thanks.
Ian

#7 lore raw
In reply to Ian Soboroff

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Quoted 9 lines · Ian Soboroff

Can anyone help me understand why 2.6-series kernel modules are so huge?

$ cd /lib/modules
$ ls -l */kernel/fs/vfat
2.4.20-18.8bigmem/kernel/fs/vfat:
total 20
-rw-r--r--    1 root     root        17678 May 29  2003 vfat.o
Quoted 3 lines

2.6.3/kernel/fs/vfat:
total 288
-rw-r--r-- 1 root root 289086 Feb 24 10:09 vfat.ko

You probably have some sort of debugging on.

devilkin@precious:/lib/modules/2.6.2/kernel/fs/vfat$ ls -l
total 20
- -rw-r--r--    1 root     root        18750 2004-02-09 12:56 vfat.ko

Jan
- --
I will make you shorter by the head.
-- Elizabeth I
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)

iD8DBQFAO3LYUQQOfidJUwQRAnSrAJ4oV2H2wxWBSL7OcEW4A0c13nq/ewCfbcgQ LCE637rjKmxxbDpiAvVy1NE=
=UVX/
-----END PGP SIGNATURE-----

#8 lore raw
In reply to Ian Soboroff
Quoted 9 lines · Ian Soboroff

Can anyone help me understand why 2.6-series kernel modules are so huge?

$ cd /lib/modules
$ ls -l */kernel/fs/vfat
2.4.20-18.8bigmem/kernel/fs/vfat:
total 20
-rw-r--r--    1 root     root        17678 May 29  2003 vfat.o

You should use size(1) for this purpose, instead of ls.

- James

Signature · 2 lines
James Morris
<[email protected]>