summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--scripts/Makefile.modpost4
-rw-r--r--scripts/mod/modpost.c6
2 files changed, 8 insertions, 2 deletions
diff --git a/scripts/Makefile.modpost b/scripts/Makefile.modpost
index 7e07adab929c..4d79afe997ad 100644
--- a/scripts/Makefile.modpost
+++ b/scripts/Makefile.modpost
@@ -79,6 +79,10 @@ src := $(obj)
# Include the module's Makefile to find KBUILD_EXTRA_SYMBOLS
include $(if $(wildcard $(KBUILD_EXTMOD)/Kbuild), \
$(KBUILD_EXTMOD)/Kbuild, $(KBUILD_EXTMOD)/Makefile)
+
+# modpost option for external modules
+MODPOST += -e
+
endif
# modpost options for modules (both in-kernel and external)
diff --git a/scripts/mod/modpost.c b/scripts/mod/modpost.c
index b8e521f50b2d..4a2f27d97bf1 100644
--- a/scripts/mod/modpost.c
+++ b/scripts/mod/modpost.c
@@ -2552,10 +2552,12 @@ int main(int argc, char **argv)
struct dump_list *dump_read_start = NULL;
struct dump_list **dump_read_iter = &dump_read_start;
- while ((opt = getopt(argc, argv, "i:mnsT:o:awENd:")) != -1) {
+ while ((opt = getopt(argc, argv, "ei:mnsT:o:awENd:")) != -1) {
switch (opt) {
- case 'i':
+ case 'e':
external_module = 1;
+ break;
+ case 'i':
*dump_read_iter =
NOFAIL(calloc(1, sizeof(**dump_read_iter)));
(*dump_read_iter)->file = optarg;