提交 f7b05e64 编写于 作者: L Luke Yang 提交者: Sam Ravnborg

kbuild: Fix bug in crc symbol generating of kernel and modules

The scripts/genksyms/genksyms.c uses hardcoded "__crc_" prefix for
crc symbols in kernel and modules. The prefix should be replaced by
"MODULE_SYMBOL_PREFIX##__crc_" otherwise there will be warnings when
MODULE_SYMBOL_PREFIX is not NULL.

I am sorry my last patch for this issue is actually wrong. I revert
it in this patch.
Signed-off-by: NLuke Yang <luke.adi@gmail.com>
Signed-off-by: NSam Ravnborg <sam@ravnborg.org>
上级 4f193362
...@@ -32,7 +32,7 @@ ...@@ -32,7 +32,7 @@
#endif /* __GNU_LIBRARY__ */ #endif /* __GNU_LIBRARY__ */
#include "genksyms.h" #include "genksyms.h"
#include "../mod/elfconfig.h"
/*----------------------------------------------------------------------*/ /*----------------------------------------------------------------------*/
#define HASH_BUCKETS 4096 #define HASH_BUCKETS 4096
...@@ -458,7 +458,7 @@ export_symbol(const char *name) ...@@ -458,7 +458,7 @@ export_symbol(const char *name)
fputs(">\n", debugfile); fputs(">\n", debugfile);
/* Used as a linker script. */ /* Used as a linker script. */
printf("__crc_%s = 0x%08lx ;\n", name, crc); printf("%s__crc_%s = 0x%08lx ;\n", MODULE_SYMBOL_PREFIX, name, crc);
} }
} }
......
...@@ -346,8 +346,8 @@ static void parse_elf_finish(struct elf_info *info) ...@@ -346,8 +346,8 @@ static void parse_elf_finish(struct elf_info *info)
release_file(info->hdr, info->size); release_file(info->hdr, info->size);
} }
#define CRC_PFX "__crc_" #define CRC_PFX MODULE_SYMBOL_PREFIX "__crc_"
#define KSYMTAB_PFX "__ksymtab_" #define KSYMTAB_PFX MODULE_SYMBOL_PREFIX "__ksymtab_"
static void handle_modversions(struct module *mod, struct elf_info *info, static void handle_modversions(struct module *mod, struct elf_info *info,
Elf_Sym *sym, const char *symname) Elf_Sym *sym, const char *symname)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册