module: fix symbol versioning with symbol prefixes
authorJames Hogan <james.hogan@imgtec.com>
Mon, 18 Mar 2013 09:08:56 +0000 (19:38 +1030)
committerRusty Russell <rusty@rustcorp.com.au>
Wed, 20 Mar 2013 00:57:26 +0000 (11:27 +1030)
commita4b6a77b77ba4f526392612c2365797fab956014
tree66d475d67327edfe822fff5436c6df8281a94426
parentb92021b09df70c1609e3547f3d6128dd560be97f
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)
kernel/module.c
scripts/mod/modpost.c