diff options
author | Rusty Russell <rusty@rustcorp.com.au> | 2013-11-06 20:39:13 -0500 |
---|---|---|
committer | Rusty Russell <rusty@rustcorp.com.au> | 2013-11-06 20:41:59 -0500 |
commit | b6568b1a19ad995221d1816c4fcdd116d9c33e42 (patch) | |
tree | 0473b80a30c4a6c43211eede3ef17f848e73e681 /scripts | |
parent | 08746a65c2961b5765a66350823ff75ace63bfd1 (diff) |
modpost: fix bogus 'exported twice' warnings.
Andi's change in e0f244c63fc9 ("asmlinkage, module: Make ksymtab and
kcrctab symbols and __this_module __visible") make the crc appear
first in the symbol table.
modpost creates an entry when it sees the CRC, then when it sees the
actual symbol, it complains that it's seen it before. The preloaded
flag already exists for the equivalent case where we loaded from
Module.symvers, so use that.
Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Tested-by: The Awesome Power Of linux-next
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/mod/modpost.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/scripts/mod/modpost.c b/scripts/mod/modpost.c index 9b873ac6ed7b..5c677a3e7487 100644 --- a/scripts/mod/modpost.c +++ b/scripts/mod/modpost.c | |||
@@ -164,7 +164,7 @@ struct symbol { | |||
164 | unsigned int vmlinux:1; /* 1 if symbol is defined in vmlinux */ | 164 | unsigned int vmlinux:1; /* 1 if symbol is defined in vmlinux */ |
165 | unsigned int kernel:1; /* 1 if symbol is from kernel | 165 | unsigned int kernel:1; /* 1 if symbol is from kernel |
166 | * (only for external modules) **/ | 166 | * (only for external modules) **/ |
167 | unsigned int preloaded:1; /* 1 if symbol from Module.symvers */ | 167 | unsigned int preloaded:1; /* 1 if symbol from Module.symvers, or crc */ |
168 | enum export export; /* Type of export */ | 168 | enum export export; /* Type of export */ |
169 | char name[0]; | 169 | char name[0]; |
170 | }; | 170 | }; |
@@ -332,8 +332,11 @@ static void sym_update_crc(const char *name, struct module *mod, | |||
332 | { | 332 | { |
333 | struct symbol *s = find_symbol(name); | 333 | struct symbol *s = find_symbol(name); |
334 | 334 | ||
335 | if (!s) | 335 | if (!s) { |
336 | s = new_symbol(name, mod, export); | 336 | s = new_symbol(name, mod, export); |
337 | /* Don't complain when we find it later. */ | ||
338 | s->preloaded = 1; | ||
339 | } | ||
337 | s->crc = crc; | 340 | s->crc = crc; |
338 | s->crc_valid = 1; | 341 | s->crc_valid = 1; |
339 | } | 342 | } |