aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/mod/modpost.c
diff options
context:
space:
mode:
authorAndi Kleen <ak@linux.intel.com>2013-11-12 18:08:38 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2013-11-12 22:09:12 -0500
commitb5064654c538ad9a2eb1195d80e7593b2e1c1452 (patch)
tree188eb110ccf4c1fadb3cef2bb255e6ae9f8b53a7 /scripts/mod/modpost.c
parent83460ec8dcac14142e7860a01fa59c267ac4657c (diff)
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 <ak@linux.intel.com> Cc: Al Viro <viro@ZenIV.linux.org.uk> Cc: Geert Uytterhoeven <geert@linux-m68k.org> Cc: Tetsuo Handa <penguin-kernel@i-love.sakura.ne.jp> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'scripts/mod/modpost.c')
-rw-r--r--scripts/mod/modpost.c15
1 files changed, 7 insertions, 8 deletions
diff --git a/scripts/mod/modpost.c b/scripts/mod/modpost.c
index 8247979e8f64..bfcea5d3b27d 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,
599 else 599 else
600 export = export_from_sec(info, get_secindex(info, sym)); 600 export = export_from_sec(info, get_secindex(info, sym));
601 601
602 /* CRC'd symbol */
603 if (strncmp(symname, CRC_PFX, strlen(CRC_PFX)) == 0) {
604 crc = (unsigned int) sym->st_value;
605 sym_update_crc(symname + strlen(CRC_PFX), mod, crc,
606 export);
607 }
608
602 switch (sym->st_shndx) { 609 switch (sym->st_shndx) {
603 case SHN_COMMON: 610 case SHN_COMMON:
604 warn("\"%s\" [%s] is COMMON symbol\n", symname, mod->name); 611 warn("\"%s\" [%s] is COMMON symbol\n", symname, mod->name);
605 break; 612 break;
606 case SHN_ABS:
607 /* CRC'd symbol */
608 if (strncmp(symname, CRC_PFX, strlen(CRC_PFX)) == 0) {
609 crc = (unsigned int) sym->st_value;
610 sym_update_crc(symname + strlen(CRC_PFX), mod, crc,
611 export);
612 }
613 break;
614 case SHN_UNDEF: 613 case SHN_UNDEF:
615 /* undefined symbol */ 614 /* undefined symbol */
616 if (ELF_ST_BIND(sym->st_info) != STB_GLOBAL && 615 if (ELF_ST_BIND(sym->st_info) != STB_GLOBAL &&