From: Andi Kleen Date: Tue, 12 Nov 2013 23:08:38 +0000 (-0800) Subject: scripts/mod/modpost.c: handle non ABS crc symbols X-Git-Tag: accepted/tizen/common/20141203.182822~1142^2~176 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=b5064654c538ad9a2eb1195d80e7593b2e1c1452;p=platform%2Fkernel%2Flinux-arm64.git scripts/mod/modpost.c: handle non ABS crc symbols For some reason I managed to trick gcc into create CRC symbols that are not absolute anymore, but weak. Make modpost handle this case. Signed-off-by: Andi Kleen Cc: Al Viro Cc: Geert Uytterhoeven Cc: Tetsuo Handa Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/scripts/mod/modpost.c b/scripts/mod/modpost.c index 8247979..bfcea5d 100644 --- a/scripts/mod/modpost.c +++ b/scripts/mod/modpost.c @@ -599,18 +599,17 @@ static void handle_modversions(struct module *mod, struct elf_info *info, else export = export_from_sec(info, get_secindex(info, sym)); + /* CRC'd symbol */ + if (strncmp(symname, CRC_PFX, strlen(CRC_PFX)) == 0) { + crc = (unsigned int) sym->st_value; + sym_update_crc(symname + strlen(CRC_PFX), mod, crc, + export); + } + switch (sym->st_shndx) { case SHN_COMMON: warn("\"%s\" [%s] is COMMON symbol\n", symname, mod->name); break; - case SHN_ABS: - /* CRC'd symbol */ - if (strncmp(symname, CRC_PFX, strlen(CRC_PFX)) == 0) { - crc = (unsigned int) sym->st_value; - sym_update_crc(symname + strlen(CRC_PFX), mod, crc, - export); - } - break; case SHN_UNDEF: /* undefined symbol */ if (ELF_ST_BIND(sym->st_info) != STB_GLOBAL &&