aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/genksyms/genksyms.c
diff options
context:
space:
mode:
authorSam Ravnborg <sam@ravnborg.org>2009-01-14 15:38:20 -0500
committerSam Ravnborg <sam@ravnborg.org>2009-01-14 15:38:20 -0500
commit2ea038917bbdd51a7ae4a898c6a04641324dd033 (patch)
tree6a6f8b1db4d097d260449f88c267e39ab9d2bb3f /scripts/genksyms/genksyms.c
parenta6525042bfdfcab128bd91fad264de10fd24a55e (diff)
Revert "kbuild: strip generated symbols from *.ko"
This reverts commit ad7a953c522ceb496611d127e51e278bfe0ff483. And commit: ("allow stripping of generated symbols under CONFIG_KALLSYMS_ALL") 9bb482476c6c9d1ae033306440c51ceac93ea80c These stripping patches has caused a set of issues: 1) People have reported compatibility issues with binutils due to lack of support for `--strip-unneeded-symbols' with objcopy 2.15.92.0.2 Reported by: Wenji 2) ccache and distcc no longer works as expeced Reported by: Ted, Roland, + others 3) The installed modules increased a lot in size Reported by: Ted, Davej + others Reported-by: Wenji Huang <wenji.huang@oracle.com> Reported-by: "Theodore Ts'o" <tytso@mit.edu> Reported-by: Dave Jones <davej@redhat.com> Reported-by: Roland McGrath <roland@redhat.com> Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Diffstat (limited to 'scripts/genksyms/genksyms.c')
-rw-r--r--scripts/genksyms/genksyms.c21
1 files changed, 6 insertions, 15 deletions
diff --git a/scripts/genksyms/genksyms.c b/scripts/genksyms/genksyms.c
index f8bb4cabd62d..3a8297b5184c 100644
--- a/scripts/genksyms/genksyms.c
+++ b/scripts/genksyms/genksyms.c
@@ -43,7 +43,7 @@ int cur_line = 1;
43char *cur_filename; 43char *cur_filename;
44 44
45static int flag_debug, flag_dump_defs, flag_reference, flag_dump_types, 45static int flag_debug, flag_dump_defs, flag_reference, flag_dump_types,
46 flag_preserve, flag_warnings, flag_asm; 46 flag_preserve, flag_warnings;
47static const char *arch = ""; 47static const char *arch = "";
48static const char *mod_prefix = ""; 48static const char *mod_prefix = "";
49 49
@@ -610,11 +610,8 @@ void export_symbol(const char *name)
610 if (flag_dump_defs) 610 if (flag_dump_defs)
611 fputs(">\n", debugfile); 611 fputs(">\n", debugfile);
612 612
613 /* Used as assembly source or a linker script. */ 613 /* Used as a linker script. */
614 printf(flag_asm 614 printf("%s__crc_%s = 0x%08lx ;\n", mod_prefix, name, crc);
615 ? ".equiv %s__crc_%s, %#08lx\n"
616 : "%s__crc_%s = %#08lx ;\n",
617 mod_prefix, name, crc);
618 } 615 }
619} 616}
620 617
@@ -651,10 +648,9 @@ void error_with_pos(const char *fmt, ...)
651 648
652static void genksyms_usage(void) 649static void genksyms_usage(void)
653{ 650{
654 fputs("Usage:\n" "genksyms [-aAdDTwqhV] > /path/to/.tmp_obj.ver\n" "\n" 651 fputs("Usage:\n" "genksyms [-adDTwqhV] > /path/to/.tmp_obj.ver\n" "\n"
655#ifdef __GNU_LIBRARY__ 652#ifdef __GNU_LIBRARY__
656 " -a, --arch Select architecture\n" 653 " -a, --arch Select architecture\n"
657 " -A, --asm Generate assembly rather than linker script\n"
658 " -d, --debug Increment the debug level (repeatable)\n" 654 " -d, --debug Increment the debug level (repeatable)\n"
659 " -D, --dump Dump expanded symbol defs (for debugging only)\n" 655 " -D, --dump Dump expanded symbol defs (for debugging only)\n"
660 " -r, --reference file Read reference symbols from a file\n" 656 " -r, --reference file Read reference symbols from a file\n"
@@ -666,7 +662,6 @@ static void genksyms_usage(void)
666 " -V, --version Print the release version\n" 662 " -V, --version Print the release version\n"
667#else /* __GNU_LIBRARY__ */ 663#else /* __GNU_LIBRARY__ */
668 " -a Select architecture\n" 664 " -a Select architecture\n"
669 " -A Generate assembly rather than linker script\n"
670 " -d Increment the debug level (repeatable)\n" 665 " -d Increment the debug level (repeatable)\n"
671 " -D Dump expanded symbol defs (for debugging only)\n" 666 " -D Dump expanded symbol defs (for debugging only)\n"
672 " -r file Read reference symbols from a file\n" 667 " -r file Read reference symbols from a file\n"
@@ -688,7 +683,6 @@ int main(int argc, char **argv)
688#ifdef __GNU_LIBRARY__ 683#ifdef __GNU_LIBRARY__
689 struct option long_opts[] = { 684 struct option long_opts[] = {
690 {"arch", 1, 0, 'a'}, 685 {"arch", 1, 0, 'a'},
691 {"asm", 0, 0, 'A'},
692 {"debug", 0, 0, 'd'}, 686 {"debug", 0, 0, 'd'},
693 {"warnings", 0, 0, 'w'}, 687 {"warnings", 0, 0, 'w'},
694 {"quiet", 0, 0, 'q'}, 688 {"quiet", 0, 0, 'q'},
@@ -701,10 +695,10 @@ int main(int argc, char **argv)
701 {0, 0, 0, 0} 695 {0, 0, 0, 0}
702 }; 696 };
703 697
704 while ((o = getopt_long(argc, argv, "a:dwqVADr:T:ph", 698 while ((o = getopt_long(argc, argv, "a:dwqVDr:T:ph",
705 &long_opts[0], NULL)) != EOF) 699 &long_opts[0], NULL)) != EOF)
706#else /* __GNU_LIBRARY__ */ 700#else /* __GNU_LIBRARY__ */
707 while ((o = getopt(argc, argv, "a:dwqVADr:T:ph")) != EOF) 701 while ((o = getopt(argc, argv, "a:dwqVDr:T:ph")) != EOF)
708#endif /* __GNU_LIBRARY__ */ 702#endif /* __GNU_LIBRARY__ */
709 switch (o) { 703 switch (o) {
710 case 'a': 704 case 'a':
@@ -722,9 +716,6 @@ int main(int argc, char **argv)
722 case 'V': 716 case 'V':
723 fputs("genksyms version 2.5.60\n", stderr); 717 fputs("genksyms version 2.5.60\n", stderr);
724 break; 718 break;
725 case 'A':
726 flag_asm = 1;
727 break;
728 case 'D': 719 case 'D':
729 flag_dump_defs = 1; 720 flag_dump_defs = 1;
730 break; 721 break;