summaryrefslogtreecommitdiff
path: root/scripts/mod/modpost.c
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-05-02 21:33:37 (GMT)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-05-02 21:33:37 (GMT)
commiteb1574270a6de8fb8d31ffc3b021e30df0afcda3 (patch)
treed154ba369f222f5108ed1a2462d815d7faadc2e5 /scripts/mod/modpost.c
parentaac10aaa8cc65a6fef6f5bc7d0b96035b0225a61 (diff)
parent69964ea4c7b68c9399f7977aa5b9aa6539a6a98a (diff)
downloadlinux-eb1574270a6de8fb8d31ffc3b021e30df0afcda3.tar.xz
Merge 3.4-rc5 into driver-core-next
This was done to resolve a merge issue with the init/main.c file. Reported-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'scripts/mod/modpost.c')
-rw-r--r--scripts/mod/modpost.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/scripts/mod/modpost.c b/scripts/mod/modpost.c
index 3f01fd9..c4e7d15 100644
--- a/scripts/mod/modpost.c
+++ b/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));