diff options
author | Clark Williams <williams@redhat.com> | 2012-04-14 09:13:39 -0500 |
---|---|---|
committer | Clark Williams <williams@redhat.com> | 2012-04-14 09:13:39 -0500 |
commit | 4905660cd237e4c4ede46920851caa12739f006f (patch) | |
tree | ef37e7c9f52c9ae9c2b206658556f37d67fe43eb /scripts | |
parent | 1b5e39fc18a1b8ff7ea425ce5f49307cb28a880f (diff) | |
parent | 0147c2ae9d602b5791dae30322ece475271acd10 (diff) |
Merge commit 'v3.2.15' into rt-3.2.15-rt24v3.2.15-rt24
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/mod/modpost.c | 9 | ||||
-rw-r--r-- | scripts/mod/modpost.h | 1 |
2 files changed, 7 insertions, 3 deletions
diff --git a/scripts/mod/modpost.c b/scripts/mod/modpost.c index 2bd594e6d1b4..619228d156c4 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)); @@ -849,7 +852,7 @@ static void check_section(const char *modname, struct elf_info *elf, #define ALL_INIT_DATA_SECTIONS \ ".init.setup$", ".init.rodata$", \ - ".devinit.rodata$", ".cpuinit.rodata$", ".meminit.rodata$" \ + ".devinit.rodata$", ".cpuinit.rodata$", ".meminit.rodata$", \ ".init.data$", ".devinit.data$", ".cpuinit.data$", ".meminit.data$" #define ALL_EXIT_DATA_SECTIONS \ ".exit.data$", ".devexit.data$", ".cpuexit.data$", ".memexit.data$" diff --git a/scripts/mod/modpost.h b/scripts/mod/modpost.h index 2031119080dc..51207e4d5f8b 100644 --- a/scripts/mod/modpost.h +++ b/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 { |