summaryrefslogtreecommitdiff
path: root/scripts/kallsyms.c
diff options
context:
space:
mode:
authorSam Ravnborg <sam@ravnborg.org>2009-01-14 21:38:20 +0100
committerSam Ravnborg <sam@ravnborg.org>2009-01-14 21:38:20 +0100
commit2ea038917bbdd51a7ae4a898c6a04641324dd033 (patch)
tree6a6f8b1db4d097d260449f88c267e39ab9d2bb3f /scripts/kallsyms.c
parenta6525042bfdfcab128bd91fad264de10fd24a55e (diff)
downloadlinux-3.10-2ea038917bbdd51a7ae4a898c6a04641324dd033.tar.gz
linux-3.10-2ea038917bbdd51a7ae4a898c6a04641324dd033.tar.bz2
linux-3.10-2ea038917bbdd51a7ae4a898c6a04641324dd033.zip
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/kallsyms.c')
-rw-r--r--scripts/kallsyms.c21
1 files changed, 13 insertions, 8 deletions
diff --git a/scripts/kallsyms.c b/scripts/kallsyms.c
index 92758120a76..ad2434b2697 100644
--- a/scripts/kallsyms.c
+++ b/scripts/kallsyms.c
@@ -130,9 +130,18 @@ static int read_symbol(FILE *in, struct sym_entry *s)
static int symbol_valid(struct sym_entry *s)
{
/* Symbols which vary between passes. Passes 1 and 2 must have
- * identical symbol lists.
+ * identical symbol lists. The kallsyms_* symbols below are only added
+ * after pass 1, they would be included in pass 2 when --all-symbols is
+ * specified so exclude them to get a stable symbol list.
*/
static char *special_symbols[] = {
+ "kallsyms_addresses",
+ "kallsyms_num_syms",
+ "kallsyms_names",
+ "kallsyms_markers",
+ "kallsyms_token_table",
+ "kallsyms_token_index",
+
/* Exclude linker generated symbols which vary between passes */
"_SDA_BASE_", /* ppc */
"_SDA2_BASE_", /* ppc */
@@ -164,9 +173,7 @@ static int symbol_valid(struct sym_entry *s)
}
/* Exclude symbols which vary between passes. */
- if (strstr((char *)s->sym + offset, "_compiled.") ||
- strncmp((char*)s->sym + offset, "__compound_literal.", 19) == 0 ||
- strncmp((char*)s->sym + offset, "__compound_literal$", 19) == 0)
+ if (strstr((char *)s->sym + offset, "_compiled."))
return 0;
for (i = 0; special_symbols[i]; i++)
@@ -543,10 +550,8 @@ int main(int argc, char **argv)
usage();
read_map(stdin);
- if (table_cnt) {
- sort_symbols();
- optimize_token_table();
- }
+ sort_symbols();
+ optimize_token_table();
write_src();
return 0;