Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 298898
b: refs/heads/master
c: 258f742
h: refs/heads/master
v: v3
  • Loading branch information
Frank Rowand authored and Linus Torvalds committed Apr 10, 2012
1 parent 52f192b commit a9c14ab
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 83dbbdbb38666e20a75fad2294cf1df77c52f121
refs/heads/master: 258f742635360175564e9470eb060ff4d4b984e7
7 changes: 5 additions & 2 deletions trunk/scripts/mod/modpost.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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));
Expand Down
1 change: 1 addition & 0 deletions trunk/scripts/mod/modpost.h
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,7 @@ struct module {
int has_cleanup;
struct buffer dev_table_buf;
char srcversion[25];
int is_dot_o;
};

struct elf_info {
Expand Down

0 comments on commit a9c14ab

Please sign in to comment.