Skip to contentSkip to conversation

module: use MODULE_SYMBOL_PREFIX with module_layout

PATCH New Rusty Russell 1 participant 1 message Jul 23, 2009

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 module: use MODULE_SYMBOL_PREFIX with module_layout

From: Mike Frysinger <[email protected]>

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.

---
 kernel/module.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
kernel/module.c +2 -1
@@ -1068,7 +1068,8 @@ static inline int check_modstruct_versio
 {
 	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);
 }