aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/module.c
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2008-07-22 20:24:27 -0400
committerRusty Russell <rusty@rustcorp.com.au>2008-07-22 05:24:27 -0400
commit2f0f2a334bc38b61a9afca951185cd3844ee709d (patch)
treec73089563f51c818ed97dec463408d6ac9cf1e8e /kernel/module.c
parentf7f5b67557eac1131ba6532522e3c50eced34238 (diff)
module: turn longs into ints for module sizes
This shrinks module.o and each *.ko file. And finally, structure members which hold length of module code (four such members there) and count of symbols are converted from longs to ints. We cannot possibly have a module where 32 bits won't be enough to hold such counts. For one, module loading checks module size for sanity before loading, so such insanely big module will fail that test first. Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com> Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Diffstat (limited to 'kernel/module.c')
-rw-r--r--kernel/module.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/kernel/module.c b/kernel/module.c
index ea9580521eb1..5c7eb0695b3c 100644
--- a/kernel/module.c
+++ b/kernel/module.c
@@ -1567,7 +1567,7 @@ static int simplify_symbols(Elf_Shdr *sechdrs,
1567} 1567}
1568 1568
1569/* Update size with this section: return offset. */ 1569/* Update size with this section: return offset. */
1570static long get_offset(unsigned long *size, Elf_Shdr *sechdr) 1570static long get_offset(unsigned int *size, Elf_Shdr *sechdr)
1571{ 1571{
1572 long ret; 1572 long ret;
1573 1573
@@ -2562,7 +2562,7 @@ static int m_show(struct seq_file *m, void *p)
2562 struct module *mod = list_entry(p, struct module, list); 2562 struct module *mod = list_entry(p, struct module, list);
2563 char buf[8]; 2563 char buf[8];
2564 2564
2565 seq_printf(m, "%s %lu", 2565 seq_printf(m, "%s %u",
2566 mod->name, mod->init_size + mod->core_size); 2566 mod->name, mod->init_size + mod->core_size);
2567 print_unload_info(m, mod); 2567 print_unload_info(m, mod);
2568 2568