Commit a4b6a77b77ba4f526392612c2365797fab956014
Committed by
Rusty Russell
1 parent
b92021b09d
Exists in
master
and in
20 other branches
module: fix symbol versioning with symbol prefixes
Fix symbol versioning on architectures with symbol prefixes. Although the build was free from warnings the actual modules still wouldn't load as the ____versions table contained unprefixed symbol names, which were being compared against the prefixed symbol names when checking the symbol versions. This is fixed by modifying modpost to add the symbol prefix to the ____versions table it outputs (Modules.symvers still contains unprefixed symbol names). The check_modstruct_version() function is also fixed as it checks the version of the unprefixed "module_layout" symbol which would no longer work. Signed-off-by: James Hogan <james.hogan@imgtec.com> Cc: Michal Marek <mmarek@suse.cz> Cc: Sam Ravnborg <sam@ravnborg.org> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Cc: Jonathan Kliegman <kliegs@chromium.org> Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> (use VMLINUX_SYMBOL_STR)
Showing 2 changed files with 4 additions and 2 deletions Side-by-side Diff
kernel/module.c
... | ... | @@ -1212,7 +1212,8 @@ |
1212 | 1212 | if (!find_symbol(VMLINUX_SYMBOL_STR(module_layout), NULL, |
1213 | 1213 | &crc, true, false)) |
1214 | 1214 | BUG(); |
1215 | - return check_version(sechdrs, versindex, "module_layout", mod, crc, | |
1215 | + return check_version(sechdrs, versindex, | |
1216 | + VMLINUX_SYMBOL_STR(module_layout), mod, crc, | |
1216 | 1217 | NULL); |
1217 | 1218 | } |
1218 | 1219 |
scripts/mod/modpost.c