aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/kallsyms.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2008-12-28 18:13:48 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2008-12-28 18:13:48 -0500
commit96faec945f39cab38403f60f515bff43660b4dab (patch)
treee6681330a42303bb34be80d347cd01ff79f5b80a /scripts/kallsyms.c
parent2926328554fa740518e2a6585b2cefb01e5f65f3 (diff)
parent9bb482476c6c9d1ae033306440c51ceac93ea80c (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/sam/kbuild-next
* git://git.kernel.org/pub/scm/linux/kernel/git/sam/kbuild-next: (25 commits) allow stripping of generated symbols under CONFIG_KALLSYMS_ALL kbuild: strip generated symbols from *.ko kbuild: simplify use of genksyms kernel-doc: check for extra kernel-doc notations kbuild: add headerdep used to detect inclusion cycles in header files kbuild: fix string equality testing in tags.sh kbuild: fix make tags/cscope kbuild: fix make incompatibility kbuild: remove TAR_IGNORE setlocalversion: add git-svn support setlocalversion: print correct subversion revision scripts: improve the decodecode script scripts/package: allow custom options to rpm genksyms: allow to ignore symbol checksum changes genksyms: track symbol checksum changes tags and cscope support really belongs in a shell script kconfig: fix options to check-lxdialog.sh kbuild: gen_init_cpio expands shell variables in file names remove bashisms from scripts/extract-ikconfig kbuild: teach mkmakfile to be silent ...
Diffstat (limited to 'scripts/kallsyms.c')
-rw-r--r--scripts/kallsyms.c21
1 files changed, 8 insertions, 13 deletions
diff --git a/scripts/kallsyms.c b/scripts/kallsyms.c
index ad2434b26970..92758120a767 100644
--- a/scripts/kallsyms.c
+++ b/scripts/kallsyms.c
@@ -130,18 +130,9 @@ static int read_symbol(FILE *in, struct sym_entry *s)
130static int symbol_valid(struct sym_entry *s) 130static int symbol_valid(struct sym_entry *s)
131{ 131{
132 /* Symbols which vary between passes. Passes 1 and 2 must have 132 /* Symbols which vary between passes. Passes 1 and 2 must have
133 * identical symbol lists. The kallsyms_* symbols below are only added 133 * identical symbol lists.
134 * after pass 1, they would be included in pass 2 when --all-symbols is
135 * specified so exclude them to get a stable symbol list.
136 */ 134 */
137 static char *special_symbols[] = { 135 static char *special_symbols[] = {
138 "kallsyms_addresses",
139 "kallsyms_num_syms",
140 "kallsyms_names",
141 "kallsyms_markers",
142 "kallsyms_token_table",
143 "kallsyms_token_index",
144
145 /* Exclude linker generated symbols which vary between passes */ 136 /* Exclude linker generated symbols which vary between passes */
146 "_SDA_BASE_", /* ppc */ 137 "_SDA_BASE_", /* ppc */
147 "_SDA2_BASE_", /* ppc */ 138 "_SDA2_BASE_", /* ppc */
@@ -173,7 +164,9 @@ static int symbol_valid(struct sym_entry *s)
173 } 164 }
174 165
175 /* Exclude symbols which vary between passes. */ 166 /* Exclude symbols which vary between passes. */
176 if (strstr((char *)s->sym + offset, "_compiled.")) 167 if (strstr((char *)s->sym + offset, "_compiled.") ||
168 strncmp((char*)s->sym + offset, "__compound_literal.", 19) == 0 ||
169 strncmp((char*)s->sym + offset, "__compound_literal$", 19) == 0)
177 return 0; 170 return 0;
178 171
179 for (i = 0; special_symbols[i]; i++) 172 for (i = 0; special_symbols[i]; i++)
@@ -550,8 +543,10 @@ int main(int argc, char **argv)
550 usage(); 543 usage();
551 544
552 read_map(stdin); 545 read_map(stdin);
553 sort_symbols(); 546 if (table_cnt) {
554 optimize_token_table(); 547 sort_symbols();
548 optimize_token_table();
549 }
555 write_src(); 550 write_src();
556 551
557 return 0; 552 return 0;