diff options
author | Steve French <sfrench@us.ibm.com> | 2008-04-25 16:20:10 -0400 |
---|---|---|
committer | Steve French <sfrench@us.ibm.com> | 2008-04-25 16:20:10 -0400 |
commit | 404e86e1550cc2c84bb57a372af784585c732f9a (patch) | |
tree | c0e8e2d61c1b1c79705c0dc9f0f16e35267286e4 /scripts/mod/modpost.c | |
parent | 0206e61b467fde4d7b50f1a64355182a4fd9576b (diff) | |
parent | b9fa38f75ea7e1f64bc29653ca9758303ce698e4 (diff) |
Merge branch 'master' of /pub/scm/linux/kernel/git/torvalds/linux-2.6
Diffstat (limited to 'scripts/mod/modpost.c')
-rw-r--r-- | scripts/mod/modpost.c | 27 |
1 files changed, 26 insertions, 1 deletions
diff --git a/scripts/mod/modpost.c b/scripts/mod/modpost.c index 110cf243fa4e..f8b42ab0724b 100644 --- a/scripts/mod/modpost.c +++ b/scripts/mod/modpost.c | |||
@@ -1552,6 +1552,10 @@ static void read_symbols(char *modname) | |||
1552 | } | 1552 | } |
1553 | 1553 | ||
1554 | license = get_modinfo(info.modinfo, info.modinfo_len, "license"); | 1554 | license = get_modinfo(info.modinfo, info.modinfo_len, "license"); |
1555 | if (!license && !is_vmlinux(modname)) | ||
1556 | fatal("modpost: missing MODULE_LICENSE() in %s\n" | ||
1557 | "see include/linux/module.h for " | ||
1558 | "more information\n", modname); | ||
1555 | while (license) { | 1559 | while (license) { |
1556 | if (license_is_gpl_compatible(license)) | 1560 | if (license_is_gpl_compatible(license)) |
1557 | mod->gpl_compatible = 1; | 1561 | mod->gpl_compatible = 1; |
@@ -2015,6 +2019,11 @@ static void write_markers(const char *fname) | |||
2015 | write_if_changed(&buf, fname); | 2019 | write_if_changed(&buf, fname); |
2016 | } | 2020 | } |
2017 | 2021 | ||
2022 | struct ext_sym_list { | ||
2023 | struct ext_sym_list *next; | ||
2024 | const char *file; | ||
2025 | }; | ||
2026 | |||
2018 | int main(int argc, char **argv) | 2027 | int main(int argc, char **argv) |
2019 | { | 2028 | { |
2020 | struct module *mod; | 2029 | struct module *mod; |
@@ -2025,8 +2034,10 @@ int main(int argc, char **argv) | |||
2025 | char *markers_write = NULL; | 2034 | char *markers_write = NULL; |
2026 | int opt; | 2035 | int opt; |
2027 | int err; | 2036 | int err; |
2037 | struct ext_sym_list *extsym_iter; | ||
2038 | struct ext_sym_list *extsym_start = NULL; | ||
2028 | 2039 | ||
2029 | while ((opt = getopt(argc, argv, "i:I:cmsSo:awM:K:")) != -1) { | 2040 | while ((opt = getopt(argc, argv, "i:I:e:cmsSo:awM:K:")) != -1) { |
2030 | switch (opt) { | 2041 | switch (opt) { |
2031 | case 'i': | 2042 | case 'i': |
2032 | kernel_read = optarg; | 2043 | kernel_read = optarg; |
@@ -2038,6 +2049,14 @@ int main(int argc, char **argv) | |||
2038 | case 'c': | 2049 | case 'c': |
2039 | cross_build = 1; | 2050 | cross_build = 1; |
2040 | break; | 2051 | break; |
2052 | case 'e': | ||
2053 | external_module = 1; | ||
2054 | extsym_iter = | ||
2055 | NOFAIL(malloc(sizeof(*extsym_iter))); | ||
2056 | extsym_iter->next = extsym_start; | ||
2057 | extsym_iter->file = optarg; | ||
2058 | extsym_start = extsym_iter; | ||
2059 | break; | ||
2041 | case 'm': | 2060 | case 'm': |
2042 | modversions = 1; | 2061 | modversions = 1; |
2043 | break; | 2062 | break; |
@@ -2071,6 +2090,12 @@ int main(int argc, char **argv) | |||
2071 | read_dump(kernel_read, 1); | 2090 | read_dump(kernel_read, 1); |
2072 | if (module_read) | 2091 | if (module_read) |
2073 | read_dump(module_read, 0); | 2092 | read_dump(module_read, 0); |
2093 | while (extsym_start) { | ||
2094 | read_dump(extsym_start->file, 0); | ||
2095 | extsym_iter = extsym_start->next; | ||
2096 | free(extsym_start); | ||
2097 | extsym_start = extsym_iter; | ||
2098 | } | ||
2074 | 2099 | ||
2075 | while (optind < argc) | 2100 | while (optind < argc) |
2076 | read_symbols(argv[optind++]); | 2101 | read_symbols(argv[optind++]); |