summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorMasahiro Yamada <masahiroy@kernel.org>2020-04-25 03:59:20 +0900
committerSascha Hauer <s.hauer@pengutronix.de>2020-04-27 21:16:59 +0200
commitd087dcec84625ac068c3201e15cd8ab8cc85701d (patch)
tree532504ead13160edecd3f0178d278a6c64baae10 /scripts
parentd194c36d00962fcc42958f83e9138da1e3513dfc (diff)
downloadbarebox-d087dcec84625ac068c3201e15cd8ab8cc85701d.tar.gz
barebox-d087dcec84625ac068c3201e15cd8ab8cc85701d.tar.xz
modpost: sync mk_elfconfig.c with Linux 5.7-rc2
Just get rid of the argument $(ARCH), then hardcode MODULE_SYMBOL_PREFIX. This should have no impact because none of v850, h8300, blackfin is supported by barebox. Signed-off-by: Masahiro Yamada <masahiroy@kernel.org> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'scripts')
-rw-r--r--scripts/mod/Makefile2
-rw-r--r--scripts/mod/mk_elfconfig.c11
-rw-r--r--scripts/mod/modpost.c2
3 files changed, 4 insertions, 11 deletions
diff --git a/scripts/mod/Makefile b/scripts/mod/Makefile
index c5aa348924..e02b9f4ce9 100644
--- a/scripts/mod/Makefile
+++ b/scripts/mod/Makefile
@@ -8,7 +8,7 @@ modpost-objs := modpost.o sumversion.o
$(obj)/modpost.o $(obj)/file2alias.o $(obj)/sumversion.o: $(obj)/elfconfig.h
quiet_cmd_elfconfig = MKELF $@
- cmd_elfconfig = $(obj)/mk_elfconfig $(ARCH) < $< > $@
+ cmd_elfconfig = $(obj)/mk_elfconfig < $< > $@
$(obj)/elfconfig.h: $(obj)/empty.o $(obj)/mk_elfconfig FORCE
$(call if_changed,elfconfig)
diff --git a/scripts/mod/mk_elfconfig.c b/scripts/mod/mk_elfconfig.c
index db3881f14c..680eade89b 100644
--- a/scripts/mod/mk_elfconfig.c
+++ b/scripts/mod/mk_elfconfig.c
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
@@ -9,9 +10,6 @@ main(int argc, char **argv)
unsigned char ei[EI_NIDENT];
union { short s; char c[2]; } endian_test;
- if (argc != 2) {
- fprintf(stderr, "Error: no arch\n");
- }
if (fread(ei, 1, EI_NIDENT, stdin) != EI_NIDENT) {
fprintf(stderr, "Error: input truncated\n");
return 1;
@@ -55,12 +53,5 @@ main(int argc, char **argv)
else
exit(1);
- if ((strcmp(argv[1], "v850") == 0) || (strcmp(argv[1], "h8300") == 0)
- || (strcmp(argv[1], "blackfin") == 0))
- printf("#define MODULE_SYMBOL_PREFIX \"_\"\n");
- else
- printf("#define MODULE_SYMBOL_PREFIX \"\"\n");
-
return 0;
}
-
diff --git a/scripts/mod/modpost.c b/scripts/mod/modpost.c
index 795ee8d09b..a42f1e6ce1 100644
--- a/scripts/mod/modpost.c
+++ b/scripts/mod/modpost.c
@@ -31,6 +31,8 @@ static inline int license_is_gpl_compatible(const char *license)
}
#endif
+#define MODULE_SYMBOL_PREFIX ""
+
/* Are we using CONFIG_MODVERSIONS? */
int modversions = 0;
/* Warn about undefined symbols? (do so if we have vmlinux) */