diff options
author | Rusty Russell <rusty@rustcorp.com.au> | 2009-03-03 09:24:45 +1100 |
---|---|---|
committer | Stephen Rothwell <sfr@canb.auug.org.au> | 2009-03-03 09:24:45 +1100 |
commit | fad3df65366aa579e30a1cec60a4044b911f50aa (patch) | |
tree | f713238c99f9c840c8d64b8ef15fc090182b9769 /kernel | |
parent | 8e2cf4b89747f3bb9e83395078487fb41e7e7bd5 (diff) |
module:version-modversion_info
With CONFIG_MODVERSIONS, we version 'struct module' using a dummy
export, but other things matter too:
1) 'struct modversion_info' determines the layout of the __versions section,
2) 'struct kernel_param' determines the layout of the __params section,
3) 'struct kernel_symbol' determines __ksymtab*.
4) 'struct marker' determines __markers.
5) 'struct tracepoint' determines __tracepoints.
So we rename 'struct_module' to 'module_layout' and include these in
the signature. Now it's general we can add others later on without
confusion.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/module.c | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/kernel/module.c b/kernel/module.c index 75865f0e756d..2d16b4b3e199 100644 --- a/kernel/module.c +++ b/kernel/module.c @@ -1018,9 +1018,9 @@ static inline int check_modstruct_version(Elf_Shdr *sechdrs, { const unsigned long *crc; - if (!find_symbol("struct_module", NULL, &crc, true, false)) + if (!find_symbol("module_layout", NULL, &crc, true, false)) BUG(); - return check_version(sechdrs, versindex, "struct_module", mod, crc); + return check_version(sechdrs, versindex, "module_layout", mod, crc); } /* First part is kernel version, which we ignore if module has crcs. */ @@ -2824,9 +2824,17 @@ void print_modules(void) } #ifdef CONFIG_MODVERSIONS -/* Generate the signature for struct module here, too, for modversions. */ -void struct_module(struct module *mod) { return; } -EXPORT_SYMBOL(struct_module); +/* Generate the signature for all relevant module structures here. + * If these change, we don't want to try to parse the module. */ +void module_layout(struct module *mod, + struct modversion_info *ver, + struct kernel_param *kp, + struct kernel_symbol *ks, + struct marker *marker, + struct tracepoint *tp) +{ +} +EXPORT_SYMBOL(module_layout); #endif #ifdef CONFIG_MARKERS |