From a9c14abc617c190f701d2167f6f7b70b3235ddee Mon Sep 17 00:00:00 2001 From: Frank Rowand Date: Mon, 9 Apr 2012 17:59:03 -0700 Subject: [PATCH] --- yaml --- r: 298898 b: refs/heads/master c: 258f742635360175564e9470eb060ff4d4b984e7 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/scripts/mod/modpost.c | 7 +++++-- trunk/scripts/mod/modpost.h | 1 + 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/[refs] b/[refs] index 936f7fee41d3..e0fbc5ea410d 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 83dbbdbb38666e20a75fad2294cf1df77c52f121 +refs/heads/master: 258f742635360175564e9470eb060ff4d4b984e7 diff --git a/trunk/scripts/mod/modpost.c b/trunk/scripts/mod/modpost.c index 3f01fd908730..c4e7d1510f9d 100644 --- a/trunk/scripts/mod/modpost.c +++ b/trunk/scripts/mod/modpost.c @@ -132,8 +132,10 @@ static struct module *new_module(char *modname) /* strip trailing .o */ s = strrchr(p, '.'); if (s != NULL) - if (strcmp(s, ".o") == 0) + if (strcmp(s, ".o") == 0) { *s = '\0'; + mod->is_dot_o = 1; + } /* add to list */ mod->name = p; @@ -587,7 +589,8 @@ static void handle_modversions(struct module *mod, struct elf_info *info, unsigned int crc; enum export export; - if (!is_vmlinux(mod->name) && strncmp(symname, "__ksymtab", 9) == 0) + if ((!is_vmlinux(mod->name) || mod->is_dot_o) && + strncmp(symname, "__ksymtab", 9) == 0) export = export_from_secname(info, get_secindex(info, sym)); else export = export_from_sec(info, get_secindex(info, sym)); diff --git a/trunk/scripts/mod/modpost.h b/trunk/scripts/mod/modpost.h index 2031119080dc..51207e4d5f8b 100644 --- a/trunk/scripts/mod/modpost.h +++ b/trunk/scripts/mod/modpost.h @@ -113,6 +113,7 @@ struct module { int has_cleanup; struct buffer dev_table_buf; char srcversion[25]; + int is_dot_o; }; struct elf_info {