summaryrefslogtreecommitdiff
path: root/kernel
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2009-06-19 03:49:22 -0400
committerStephen Rothwell <sfr@canb.auug.org.au>2009-07-29 10:34:19 +1000
commit5fd0af6ee5ca80e64977ac6ec34be95a260a94d4 (patch)
tree9411dd651b2bcdeec6959f293609cd412e303d92 /kernel
parent78af08d90b8f745044b1274430bc4bc6b2b27aca (diff)
module: use MODULE_SYMBOL_PREFIX with module_layout
The check_modstruct_version() needs to look up the symbol "module_layout" in the kernel, but it does so literally and not by a C identifier. The trouble is that it does not include a symbol prefix for those ports that need it (like the Blackfin and H8300 port). So make sure we tack on the MODULE_SYMBOL_PREFIX define to the front of it. Signed-off-by: Mike Frysinger <vapier@gentoo.org> Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Diffstat (limited to 'kernel')
-rw-r--r--kernel/module.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/kernel/module.c b/kernel/module.c
index 0a049837008e..fd1411403558 100644
--- a/kernel/module.c
+++ b/kernel/module.c
@@ -1068,7 +1068,8 @@ static inline int check_modstruct_version(Elf_Shdr *sechdrs,
{
const unsigned long *crc;
- if (!find_symbol("module_layout", NULL, &crc, true, false))
+ if (!find_symbol(MODULE_SYMBOL_PREFIX "module_layout", NULL,
+ &crc, true, false))
BUG();
return check_version(sechdrs, versindex, "module_layout", mod, crc);
}