Commit d24e6935 authored by Kai Germaschewski's avatar Kai Germaschewski

kbuild: Fix a 64-bit issue in scripts/modpost.c

The checksums are generally 32-bit (unsigned int), though they are saved
in symbol values, which may 64-bit, so we need to convert.

Pointed out by Anton Blanchard.
parent cdf13884
......@@ -270,6 +270,7 @@ handle_modversions(struct module *mod, struct elf_info *info,
Elf_Sym *sym, const char *symname)
{
struct symbol *s;
unsigned int crc;
switch (sym->st_shndx) {
case SHN_COMMON:
......@@ -279,7 +280,8 @@ handle_modversions(struct module *mod, struct elf_info *info,
case SHN_ABS:
/* CRC'd symbol */
if (memcmp(symname, "__crc_", 6) == 0) {
add_exported_symbol(symname+6, mod, &sym->st_value);
crc = (unsigned int) sym->st_value;
add_exported_symbol(symname+6, mod, &crc);
modversions = 1;
}
break;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment