summaryrefslogtreecommitdiffstats
path: root/scripts/kallsyms.c
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2009-03-26 18:49:48 +0100
committerIngo Molnar <mingo@elte.hu>2009-03-26 18:49:48 +0100
commit18ffa418aead13c56515ac74cd26105102128aca (patch)
tree2096ea8db3b2594bd25ad39a70edc691219f669b /scripts/kallsyms.c
parentab76f3d771590d5c89faa3219559c5d3fc0ce0c2 (diff)
parent8e0ee43bc2c3e19db56a4adaa9a9b04ce885cd84 (diff)
downloadop-kernel-dev-18ffa418aead13c56515ac74cd26105102128aca.zip
op-kernel-dev-18ffa418aead13c56515ac74cd26105102128aca.tar.gz
Merge commit 'v2.6.29' into x86/setup-lzma
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 9275812..ad2434b 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;
OpenPOWER on IntegriCloud