diff options
Diffstat (limited to 'scripts/kallsyms.c')
-rw-r--r-- | scripts/kallsyms.c | 29 |
1 files changed, 20 insertions, 9 deletions
diff --git a/scripts/kallsyms.c b/scripts/kallsyms.c index c6d33bd15b04..8fa81e84e295 100644 --- a/scripts/kallsyms.c +++ b/scripts/kallsyms.c | |||
@@ -212,15 +212,22 @@ static int symbol_valid(struct sym_entry *s) | |||
212 | "_SDA_BASE_", /* ppc */ | 212 | "_SDA_BASE_", /* ppc */ |
213 | "_SDA2_BASE_", /* ppc */ | 213 | "_SDA2_BASE_", /* ppc */ |
214 | NULL }; | 214 | NULL }; |
215 | |||
216 | static char *special_suffixes[] = { | ||
217 | "_veneer", /* arm */ | ||
218 | NULL }; | ||
219 | |||
215 | int i; | 220 | int i; |
216 | int offset = 1; | 221 | char *sym_name = (char *)s->sym + 1; |
222 | |||
217 | 223 | ||
218 | if (s->addr < kernel_start_addr) | 224 | if (s->addr < kernel_start_addr) |
219 | return 0; | 225 | return 0; |
220 | 226 | ||
221 | /* skip prefix char */ | 227 | /* skip prefix char */ |
222 | if (symbol_prefix_char && *(s->sym + 1) == symbol_prefix_char) | 228 | if (symbol_prefix_char && *sym_name == symbol_prefix_char) |
223 | offset++; | 229 | sym_name++; |
230 | |||
224 | 231 | ||
225 | /* if --all-symbols is not specified, then symbols outside the text | 232 | /* if --all-symbols is not specified, then symbols outside the text |
226 | * and inittext sections are discarded */ | 233 | * and inittext sections are discarded */ |
@@ -235,22 +242,26 @@ static int symbol_valid(struct sym_entry *s) | |||
235 | * rules. | 242 | * rules. |
236 | */ | 243 | */ |
237 | if ((s->addr == text_range_text->end && | 244 | if ((s->addr == text_range_text->end && |
238 | strcmp((char *)s->sym + offset, | 245 | strcmp(sym_name, |
239 | text_range_text->end_sym)) || | 246 | text_range_text->end_sym)) || |
240 | (s->addr == text_range_inittext->end && | 247 | (s->addr == text_range_inittext->end && |
241 | strcmp((char *)s->sym + offset, | 248 | strcmp(sym_name, |
242 | text_range_inittext->end_sym))) | 249 | text_range_inittext->end_sym))) |
243 | return 0; | 250 | return 0; |
244 | } | 251 | } |
245 | 252 | ||
246 | /* Exclude symbols which vary between passes. */ | 253 | /* Exclude symbols which vary between passes. */ |
247 | if (strstr((char *)s->sym + offset, "_compiled.")) | ||
248 | return 0; | ||
249 | |||
250 | for (i = 0; special_symbols[i]; i++) | 254 | for (i = 0; special_symbols[i]; i++) |
251 | if( strcmp((char *)s->sym + offset, special_symbols[i]) == 0 ) | 255 | if (strcmp(sym_name, special_symbols[i]) == 0) |
252 | return 0; | 256 | return 0; |
253 | 257 | ||
258 | for (i = 0; special_suffixes[i]; i++) { | ||
259 | int l = strlen(sym_name) - strlen(special_suffixes[i]); | ||
260 | |||
261 | if (l >= 0 && strcmp(sym_name + l, special_suffixes[i]) == 0) | ||
262 | return 0; | ||
263 | } | ||
264 | |||
254 | return 1; | 265 | return 1; |
255 | } | 266 | } |
256 | 267 | ||