diff options
author | Sam Ravnborg <sam@ravnborg.org> | 2007-07-20 22:36:56 +0200 |
---|---|---|
committer | Sam Ravnborg <sam@ravnborg.org> | 2007-07-25 21:14:15 +0200 |
commit | 8d8d8289df65cb116d2721becafb37272074f25a (patch) | |
tree | 388c4be27f36df9a1c4c60f8642dae74b3291af9 /scripts/mod | |
parent | 80492cc797ea15572de8eac766cbf606626ee338 (diff) | |
download | kernel_samsung_tuna-8d8d8289df65cb116d2721becafb37272074f25a.zip kernel_samsung_tuna-8d8d8289df65cb116d2721becafb37272074f25a.tar.gz kernel_samsung_tuna-8d8d8289df65cb116d2721becafb37272074f25a.tar.bz2 |
kbuild: do not do section mismatch checks on vmlinux in 2nd pass
We already check and warn about section mismatches from vmlinux
(build as vmlinux.o) during first pass so skip the checks
during the 2nd pass where we process modules.
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Diffstat (limited to 'scripts/mod')
-rw-r--r-- | scripts/mod/modpost.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/scripts/mod/modpost.c b/scripts/mod/modpost.c index 5ab7914..87e3ee5 100644 --- a/scripts/mod/modpost.c +++ b/scripts/mod/modpost.c @@ -23,6 +23,8 @@ int have_vmlinux = 0; static int all_versions = 0; /* If we are modposting external module set to 1 */ static int external_module = 0; +/* Warn about section mismatch in vmlinux if set to 1 */ +static int vmlinux_section_warnings = 1; /* Only warn about unresolved symbols */ static int warn_unresolved = 0; /* How a symbol is exported */ @@ -1257,8 +1259,10 @@ static void read_symbols(char *modname) handle_modversions(mod, &info, sym, symname); handle_moddevtable(mod, &info, sym, symname); } - check_sec_ref(mod, modname, &info, init_section, init_section_ref_ok); - check_sec_ref(mod, modname, &info, exit_section, exit_section_ref_ok); + if (is_vmlinux(modname) && vmlinux_section_warnings) { + check_sec_ref(mod, modname, &info, init_section, init_section_ref_ok); + check_sec_ref(mod, modname, &info, exit_section, exit_section_ref_ok); + } version = get_modinfo(info.modinfo, info.modinfo_len, "version"); if (version) @@ -1626,7 +1630,7 @@ int main(int argc, char **argv) int opt; int err; - while ((opt = getopt(argc, argv, "i:I:mo:aw")) != -1) { + while ((opt = getopt(argc, argv, "i:I:mso:aw")) != -1) { switch(opt) { case 'i': kernel_read = optarg; @@ -1644,6 +1648,9 @@ int main(int argc, char **argv) case 'a': all_versions = 1; break; + case 's': + vmlinux_section_warnings = 0; + break; case 'w': warn_unresolved = 1; break; |