diff options
author | Rusty Russell <rusty@rustcorp.com.au> | 2008-03-13 09:02:17 +0000 |
---|---|---|
committer | Rusty Russell <rusty@rustcorp.com.au> | 2008-05-01 21:14:59 +1000 |
commit | ea01e798e2d27fd04142e0473ca36570fa9d9218 (patch) | |
tree | 717ad87d4c38dd6bed15ba4dfdfaea8f33411367 /kernel/module.c | |
parent | a58730c42174672fe0012a4edbe3e38f94ef2bad (diff) |
module: reduce module image and resident size
Resulting reduction (x86-64, gcc 4.1.2) with my (special purpose, i.e.
much reduced) configurations:
- 16k kernel resident size
- 180k module resident size
- 10k module image size
Signed-off-by: Jan Beulich <jbeulich@novell.com>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Diffstat (limited to 'kernel/module.c')
-rw-r--r-- | kernel/module.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/kernel/module.c b/kernel/module.c index b0d7c2a41bd9..031bf26af8ea 100644 --- a/kernel/module.c +++ b/kernel/module.c @@ -1828,8 +1828,9 @@ static struct module *load_module(void __user *umod, unwindex = find_sec(hdr, sechdrs, secstrings, ARCH_UNWIND_SECTION_NAME); #endif - /* Don't keep modinfo section */ + /* Don't keep modinfo and version sections. */ sechdrs[infoindex].sh_flags &= ~(unsigned long)SHF_ALLOC; + sechdrs[versindex].sh_flags &= ~(unsigned long)SHF_ALLOC; #ifdef CONFIG_KALLSYMS /* Keep symbol and string tables for decoding later. */ sechdrs[symindex].sh_flags |= SHF_ALLOC; |