History

modpost: re-add -e to set external_module flag

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.

Masahiro Yamada committed 6 years ago

Commit e3fb4df1 parent 79247992 files · +8 −2Browse files

Showing the changes to scripts (2 of 2 files). Show all

Unified · Split

2 files
  1. scripts/Makefile.modpost +4 −0
  2. scripts/mod/modpost.c +4 −2
scripts/Makefile.modpost+4−0
@@ -79,6 +79,10 @@ src := $(obj) · 78 unmodified lines
79# Include the module's Makefile to find KBUILD_EXTRA_SYMBOLS79# Include the module's Makefile to find KBUILD_EXTRA_SYMBOLS
80include $(if $(wildcard $(KBUILD_EXTMOD)/Kbuild), \80include $(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
84MODPOST += -e
85
82endif86endif
83 87
84# modpost options for modules (both in-kernel and external)88# modpost options for modules (both in-kernel and external)
scripts/mod/modpost.c+4−2
@@ -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;

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t