Previously, the -i option had two functions; load a symbol dump file, and set the external_module flag. I want to assign a dedicate option for each of them. Going forward, the -i is used to load a symbol dump file, and the -e to set the external_module flag. With this, we will be able to use -i for loading in-kernel symbols.
Showing the changes to scripts (2 of 2 files). Show all
Unified · Split
| @@ -79,6 +79,10 @@ src := $(obj) · 78 unmodified lines | |||
| 79 | # Include the module's Makefile to find KBUILD_EXTRA_SYMBOLS | 79 | # Include the module's Makefile to find KBUILD_EXTRA_SYMBOLS |
| 80 | include $(if $(wildcard $(KBUILD_EXTMOD)/Kbuild), \ | 80 | include $(if $(wildcard $(KBUILD_EXTMOD)/Kbuild), \ |
| 81 | $(KBUILD_EXTMOD)/Kbuild, $(KBUILD_EXTMOD)/Makefile) | 81 | $(KBUILD_EXTMOD)/Kbuild, $(KBUILD_EXTMOD)/Makefile) |
| 82 | |||
| 83 | # modpost option for external modules | ||
| 84 | MODPOST += -e | ||
| 85 | |||
| 82 | endif | 86 | endif |
| 83 | 87 | ||
| 84 | # modpost options for modules (both in-kernel and external) | 88 | # modpost options for modules (both in-kernel and external) |
| @@ -2552,10 +2552,12 @@ int main(int argc, char **argv) · 2551 unmodified lines | |||
| 2552 | struct dump_list *dump_read_start = NULL; | 2552 | struct dump_list *dump_read_start = NULL; |
| 2553 | struct dump_list **dump_read_iter = &dump_read_start; | 2553 | struct dump_list **dump_read_iter = &dump_read_start; |
| 2554 | 2554 | ||
| 2555 | while ((opt = getopt(argc, argv, "i:mnsT:o:awENd:")) != -1) { | 2555 | while ((opt = getopt(argc, argv, "ei:mnsT:o:awENd:")) != -1) { |
| 2556 | switch (opt) { | 2556 | switch (opt) { |
| 2557 | case 'i': | 2557 | case 'e': |
| 2558 | external_module = 1; | 2558 | external_module = 1; |
| 2559 | break; | ||
| 2560 | case 'i': | ||
| 2559 | *dump_read_iter = | 2561 | *dump_read_iter = |
| 2560 | NOFAIL(calloc(1, sizeof(**dump_read_iter))); | 2562 | NOFAIL(calloc(1, sizeof(**dump_read_iter))); |
| 2561 | (*dump_read_iter)->file = optarg; | 2563 | (*dump_read_iter)->file = optarg; |