summaryrefslogtreecommitdiffstats
path: root/scripts/mod/modpost.c
diff options
context:
space:
mode:
authorAndi Kleen <ak@linux.intel.com>2013-11-12 15:08:38 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2013-11-13 12:09:12 +0900
commitb5064654c538ad9a2eb1195d80e7593b2e1c1452 (patch)
tree188eb110ccf4c1fadb3cef2bb255e6ae9f8b53a7 /scripts/mod/modpost.c
parent83460ec8dcac14142e7860a01fa59c267ac4657c (diff)
downloadop-kernel-dev-b5064654c538ad9a2eb1195d80e7593b2e1c1452.zip
op-kernel-dev-b5064654c538ad9a2eb1195d80e7593b2e1c1452.tar.gz
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 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 &&
OpenPOWER on IntegriCloud