From: Mike Frysinger Date: Thu, 23 Jul 2009 14:12:08 +0000 (+0930) Subject: module: use MODULE_SYMBOL_PREFIX with module_layout X-Git-Tag: v3.0~8397 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=6560dc160f3a96b8f1f43e2c6b51aa6eb9898b90;p=platform%2Fkernel%2Flinux-amlogic.git 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 Signed-off-by: Rusty Russell Signed-off-by: Linus Torvalds --- diff --git a/kernel/module.c b/kernel/module.c index 0a04983..fd141140 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); }