Skip to contentSkip to conversation

Fix crc-error warning on modules

PATCH New Luke Yang 1 participant 1 message Dec 21, 2005

lore
Share & tools
lore

Luke Yang

author
#0 lore raw

PATCH 1/1 Fix crc-error warning on modules

Hi all,

This is the patch for the following issue:

In include/linux/module.h, "__crc_" and "__ksymtab_" are hard
coded to be the prefix for some kinds of symbols (CRC symbol and
ksymtab section). But in script /mod/modpost.c, MODULE_SYMBOL_PREFIX##"__crc_" is used as the prefix to search CRC symbols. So if an architecture (such as h8300 or Blackfin) defines MODULE_SYMBOL_PREFIX as not NULL ("_"), modpost will always warn about "no invalid crc".
And it is the same with KSYMTAB_PFX.

linux-2.6/scripts/mod/modpost.c +2 -2
Index: git/linux-2.6/scripts/mod/modpost.c
===================================================================
@@ -326,8 +326,8 @@
 	release_file(info->hdr, info->size);
 }
 
-#define CRC_PFX     MODULE_SYMBOL_PREFIX "__crc_"
-#define KSYMTAB_PFX MODULE_SYMBOL_PREFIX "__ksymtab_"
+#define CRC_PFX     "__crc_"
+#define KSYMTAB_PFX "__ksymtab_"
 
 void
 handle_modversions(struct module *mod, struct elf_info *info,

Best regards,
Luke Yang
Analog Device Inc.