Skip to content

Commit e3fb4df

Browse files
committed
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. Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
1 parent 7924799 commit e3fb4df

2 files changed

Lines changed: 8 additions & 2 deletions

File tree

‎scripts/Makefile.modpost‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,10 @@ src := $(obj)
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‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2552,10 +2552,12 @@ int main(int argc, char **argv)
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;

0 commit comments

Comments
 (0)