mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-26 00:21:17 +00:00
module: include other structures in module version check
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>
This commit is contained in:
parent
9cb610d8e3
commit
8c8ef42aee
2 changed files with 15 additions and 7 deletions
|
@ -1607,12 +1607,12 @@ static void read_symbols(char *modname)
|
|||
|
||||
parse_elf_finish(&info);
|
||||
|
||||
/* Our trick to get versioning for struct_module - it's
|
||||
/* Our trick to get versioning for module struct etc. - it's
|
||||
* never passed as an argument to an exported function, so
|
||||
* the automatic versioning doesn't pick it up, but it's really
|
||||
* important anyhow */
|
||||
if (modversions)
|
||||
mod->unres = alloc_symbol("struct_module", 0, mod->unres);
|
||||
mod->unres = alloc_symbol("module_layout", 0, mod->unres);
|
||||
}
|
||||
|
||||
#define SZ 500
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue