diff options
author | James Hogan <james.hogan@imgtec.com> | 2013-03-18 19:38:56 +1030 |
---|---|---|
committer | Rusty Russell <rusty@rustcorp.com.au> | 2013-03-20 11:27:26 +1030 |
commit | a4b6a77b77ba4f526392612c2365797fab956014 (patch) | |
tree | 66d475d67327edfe822fff5436c6df8281a94426 /kernel/module.c | |
parent | b92021b09df70c1609e3547f3d6128dd560be97f (diff) | |
download | lwn-a4b6a77b77ba4f526392612c2365797fab956014.tar.gz lwn-a4b6a77b77ba4f526392612c2365797fab956014.zip |
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)
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 cfd4a3f68d7d..3c2c72d3bf84 100644 --- a/kernel/module.c +++ b/kernel/module.c @@ -1212,7 +1212,8 @@ static inline int check_modstruct_version(Elf_Shdr *sechdrs, if (!find_symbol(VMLINUX_SYMBOL_STR(module_layout), NULL, &crc, true, false)) BUG(); - return check_version(sechdrs, versindex, "module_layout", mod, crc, + return check_version(sechdrs, versindex, + VMLINUX_SYMBOL_STR(module_layout), mod, crc, NULL); } |