aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMasahiro Yamada <yamada.masahiro@socionext.com>2018-05-09 03:23:46 -0400
committerMasahiro Yamada <yamada.masahiro@socionext.com>2018-05-17 09:43:35 -0400
commit74d9317161513b63ccb2f58eb866d6e91e13df98 (patch)
treeaf67d25b45884b212fa01f9bb6288869df4c7db3
parentb2c5cdcfd4bcc1fbf1caefe7f3ff909bcee10a6c (diff)
genksyms: remove symbol prefix support
CONFIG_HAVE_UNDERSCORE_SYMBOL_PREFIX was selected by BLACKFIN, METAG. They were removed by commit 4ba66a976072 ("arch: remove blackfin port"), commit bb6fb6dfcc17 ("metag: Remove arch/metag/"), respectively. No more architecture enables CONFIG_HAVE_UNDERSCORE_SYMBOL_PREFIX, hence the -s (--symbol-prefix) option is unnecessary. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Reviewed-by: Sam Ravnborg <sam@ravnborg.org>
-rw-r--r--scripts/Makefile.build2
-rw-r--r--scripts/genksyms/genksyms.c11
2 files changed, 3 insertions, 10 deletions
diff --git a/scripts/Makefile.build b/scripts/Makefile.build
index 8bdb1dc4072c..22df8d037cf2 100644
--- a/scripts/Makefile.build
+++ b/scripts/Makefile.build
@@ -147,7 +147,6 @@ $(obj)/%.i: $(src)/%.c FORCE
147cmd_gensymtypes_c = \ 147cmd_gensymtypes_c = \
148 $(CPP) -D__GENKSYMS__ $(c_flags) $< | \ 148 $(CPP) -D__GENKSYMS__ $(c_flags) $< | \
149 $(GENKSYMS) $(if $(1), -T $(2)) \ 149 $(GENKSYMS) $(if $(1), -T $(2)) \
150 $(patsubst y,-s _,$(CONFIG_HAVE_UNDERSCORE_SYMBOL_PREFIX)) \
151 $(patsubst y,-R,$(CONFIG_MODULE_REL_CRCS)) \ 150 $(patsubst y,-R,$(CONFIG_MODULE_REL_CRCS)) \
152 $(if $(KBUILD_PRESERVE),-p) \ 151 $(if $(KBUILD_PRESERVE),-p) \
153 -r $(firstword $(wildcard $(2:.symtypes=.symref) /dev/null)) 152 -r $(firstword $(wildcard $(2:.symtypes=.symref) /dev/null))
@@ -355,7 +354,6 @@ cmd_gensymtypes_S = \
355 sed 's/.*___EXPORT_SYMBOL[[:space:]]*\([a-zA-Z0-9_]*\)[[:space:]]*,.*/EXPORT_SYMBOL(\1);/' ) | \ 354 sed 's/.*___EXPORT_SYMBOL[[:space:]]*\([a-zA-Z0-9_]*\)[[:space:]]*,.*/EXPORT_SYMBOL(\1);/' ) | \
356 $(CPP) -D__GENKSYMS__ $(c_flags) -xc - | \ 355 $(CPP) -D__GENKSYMS__ $(c_flags) -xc - | \
357 $(GENKSYMS) $(if $(1), -T $(2)) \ 356 $(GENKSYMS) $(if $(1), -T $(2)) \
358 $(patsubst y,-s _,$(CONFIG_HAVE_UNDERSCORE_SYMBOL_PREFIX)) \
359 $(patsubst y,-R,$(CONFIG_MODULE_REL_CRCS)) \ 357 $(patsubst y,-R,$(CONFIG_MODULE_REL_CRCS)) \
360 $(if $(KBUILD_PRESERVE),-p) \ 358 $(if $(KBUILD_PRESERVE),-p) \
361 -r $(firstword $(wildcard $(2:.symtypes=.symref) /dev/null)) 359 -r $(firstword $(wildcard $(2:.symtypes=.symref) /dev/null))
diff --git a/scripts/genksyms/genksyms.c b/scripts/genksyms/genksyms.c
index c9235d8340f1..e007840f45b9 100644
--- a/scripts/genksyms/genksyms.c
+++ b/scripts/genksyms/genksyms.c
@@ -45,7 +45,6 @@ int in_source_file;
45 45
46static int flag_debug, flag_dump_defs, flag_reference, flag_dump_types, 46static int flag_debug, flag_dump_defs, flag_reference, flag_dump_types,
47 flag_preserve, flag_warnings, flag_rel_crcs; 47 flag_preserve, flag_warnings, flag_rel_crcs;
48static const char *mod_prefix = "";
49 48
50static int errors; 49static int errors;
51static int nsyms; 50static int nsyms;
@@ -693,10 +692,10 @@ void export_symbol(const char *name)
693 fputs(">\n", debugfile); 692 fputs(">\n", debugfile);
694 693
695 /* Used as a linker script. */ 694 /* Used as a linker script. */
696 printf(!flag_rel_crcs ? "%s__crc_%s = 0x%08lx;\n" : 695 printf(!flag_rel_crcs ? "__crc_%s = 0x%08lx;\n" :
697 "SECTIONS { .rodata : ALIGN(4) { " 696 "SECTIONS { .rodata : ALIGN(4) { "
698 "%s__crc_%s = .; LONG(0x%08lx); } }\n", 697 "__crc_%s = .; LONG(0x%08lx); } }\n",
699 mod_prefix, name, crc); 698 name, crc);
700 } 699 }
701} 700}
702 701
@@ -769,7 +768,6 @@ int main(int argc, char **argv)
769 768
770#ifdef __GNU_LIBRARY__ 769#ifdef __GNU_LIBRARY__
771 struct option long_opts[] = { 770 struct option long_opts[] = {
772 {"symbol-prefix", 1, 0, 's'},
773 {"debug", 0, 0, 'd'}, 771 {"debug", 0, 0, 'd'},
774 {"warnings", 0, 0, 'w'}, 772 {"warnings", 0, 0, 'w'},
775 {"quiet", 0, 0, 'q'}, 773 {"quiet", 0, 0, 'q'},
@@ -789,9 +787,6 @@ int main(int argc, char **argv)
789 while ((o = getopt(argc, argv, "s:dwqVDr:T:phR")) != EOF) 787 while ((o = getopt(argc, argv, "s:dwqVDr:T:phR")) != EOF)
790#endif /* __GNU_LIBRARY__ */ 788#endif /* __GNU_LIBRARY__ */
791 switch (o) { 789 switch (o) {
792 case 's':
793 mod_prefix = optarg;
794 break;
795 case 'd': 790 case 'd':
796 flag_debug++; 791 flag_debug++;
797 break; 792 break;