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
7979 # Include the module's Makefile to find KBUILD_EXTRA_SYMBOLS
8080 include $(if $(wildcard $(KBUILD_EXTMOD)/Kbuild), \
8181 $(KBUILD_EXTMOD)/Kbuild, $(KBUILD_EXTMOD)/Makefile)
82+
83+# modpost option for external modules
84+MODPOST += -e
85+
8286 endif
8387
8488 # 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
25522552 struct dump_list *dump_read_start = NULL;
25532553 struct dump_list **dump_read_iter = &dump_read_start;
25542554
2555− while ((opt = getopt(argc, argv, "i:mnsT:o:awENd:")) != -1) {
2555+ while ((opt = getopt(argc, argv, "ei:mnsT:o:awENd:")) != -1) {
25562556 switch (opt) {
2557− case 'i':
2557+ case 'e':
25582558 external_module = 1;
2559+ break;
2560+ case 'i':
25592561 *dump_read_iter =
25602562 NOFAIL(calloc(1, sizeof(**dump_read_iter)));
25612563 (*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