Commit ce2ddd6d authored by Masahiro Yamada's avatar Masahiro Yamada

modpost: allow to pass -i option multiple times to remove -e option

Now that there is no difference between -i and -e, they can be unified.

Make modpost accept the -i option multiple times, then remove -e.

I will reuse -e for a different purpose.
Signed-off-by: default avatarMasahiro Yamada <masahiroy@kernel.org>
parent 52c3416d
...@@ -50,7 +50,7 @@ MODPOST = scripts/mod/modpost \ ...@@ -50,7 +50,7 @@ MODPOST = scripts/mod/modpost \
$(if $(CONFIG_MODVERSIONS),-m) \ $(if $(CONFIG_MODVERSIONS),-m) \
$(if $(CONFIG_MODULE_SRCVERSION_ALL),-a) \ $(if $(CONFIG_MODULE_SRCVERSION_ALL),-a) \
$(if $(KBUILD_EXTMOD),-i,-o) $(kernelsymfile) \ $(if $(KBUILD_EXTMOD),-i,-o) $(kernelsymfile) \
$(if $(KBUILD_EXTMOD),$(addprefix -e ,$(KBUILD_EXTRA_SYMBOLS))) \ $(if $(KBUILD_EXTMOD),$(addprefix -i ,$(KBUILD_EXTRA_SYMBOLS))) \
$(if $(KBUILD_EXTMOD),-o $(modulesymfile)) \ $(if $(KBUILD_EXTMOD),-o $(modulesymfile)) \
$(if $(CONFIG_SECTION_MISMATCH_WARN_ONLY),,-E) \ $(if $(CONFIG_SECTION_MISMATCH_WARN_ONLY),,-E) \
$(if $(KBUILD_MODPOST_WARN),-w) $(if $(KBUILD_MODPOST_WARN),-w)
......
...@@ -2544,7 +2544,6 @@ int main(int argc, char **argv) ...@@ -2544,7 +2544,6 @@ int main(int argc, char **argv)
{ {
struct module *mod; struct module *mod;
struct buffer buf = { }; struct buffer buf = { };
char *kernel_read = NULL;
char *missing_namespace_deps = NULL; char *missing_namespace_deps = NULL;
char *dump_write = NULL, *files_source = NULL; char *dump_write = NULL, *files_source = NULL;
int opt; int opt;
...@@ -2553,13 +2552,9 @@ int main(int argc, char **argv) ...@@ -2553,13 +2552,9 @@ int main(int argc, char **argv)
struct ext_sym_list *extsym_start = NULL; struct ext_sym_list *extsym_start = NULL;
struct ext_sym_list **extsym_iter = &extsym_start; struct ext_sym_list **extsym_iter = &extsym_start;
while ((opt = getopt(argc, argv, "i:e:mnsT:o:awENd:")) != -1) { while ((opt = getopt(argc, argv, "i:mnsT:o:awENd:")) != -1) {
switch (opt) { switch (opt) {
case 'i': case 'i':
kernel_read = optarg;
external_module = 1;
break;
case 'e':
external_module = 1; external_module = 1;
*extsym_iter = NOFAIL(calloc(1, sizeof(**extsym_iter))); *extsym_iter = NOFAIL(calloc(1, sizeof(**extsym_iter)));
(*extsym_iter)->file = optarg; (*extsym_iter)->file = optarg;
...@@ -2600,8 +2595,6 @@ int main(int argc, char **argv) ...@@ -2600,8 +2595,6 @@ int main(int argc, char **argv)
} }
} }
if (kernel_read)
read_dump(kernel_read);
while (extsym_start) { while (extsym_start) {
struct ext_sym_list *tmp; struct ext_sym_list *tmp;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment