diff options
Diffstat (limited to 'scripts/kallsyms.c')
-rw-r--r-- | scripts/kallsyms.c | 21 |
1 files changed, 13 insertions, 8 deletions
diff --git a/scripts/kallsyms.c b/scripts/kallsyms.c index 92758120a767..ad2434b26970 100644 --- a/scripts/kallsyms.c +++ b/scripts/kallsyms.c | |||
@@ -130,9 +130,18 @@ static int read_symbol(FILE *in, struct sym_entry *s) | |||
130 | static int symbol_valid(struct sym_entry *s) | 130 | static 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. | 133 | * identical symbol lists. The kallsyms_* symbols below are only added |
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. | ||
134 | */ | 136 | */ |
135 | static char *special_symbols[] = { | 137 | 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 | |||
136 | /* Exclude linker generated symbols which vary between passes */ | 145 | /* Exclude linker generated symbols which vary between passes */ |
137 | "_SDA_BASE_", /* ppc */ | 146 | "_SDA_BASE_", /* ppc */ |
138 | "_SDA2_BASE_", /* ppc */ | 147 | "_SDA2_BASE_", /* ppc */ |
@@ -164,9 +173,7 @@ static int symbol_valid(struct sym_entry *s) | |||
164 | } | 173 | } |
165 | 174 | ||
166 | /* Exclude symbols which vary between passes. */ | 175 | /* Exclude symbols which vary between passes. */ |
167 | if (strstr((char *)s->sym + offset, "_compiled.") || | 176 | 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) | ||
170 | return 0; | 177 | return 0; |
171 | 178 | ||
172 | for (i = 0; special_symbols[i]; i++) | 179 | for (i = 0; special_symbols[i]; i++) |
@@ -543,10 +550,8 @@ int main(int argc, char **argv) | |||
543 | usage(); | 550 | usage(); |
544 | 551 | ||
545 | read_map(stdin); | 552 | read_map(stdin); |
546 | if (table_cnt) { | 553 | sort_symbols(); |
547 | sort_symbols(); | 554 | optimize_token_table(); |
548 | optimize_token_table(); | ||
549 | } | ||
550 | write_src(); | 555 | write_src(); |
551 | 556 | ||
552 | return 0; | 557 | return 0; |