summaryrefslogtreecommitdiffstats
path: root/scripts/kallsyms.c
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/kallsyms.c')
-rw-r--r--scripts/kallsyms.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/scripts/kallsyms.c b/scripts/kallsyms.c
index f75e7bda4889..e17837f1d3f2 100644
--- a/scripts/kallsyms.c
+++ b/scripts/kallsyms.c
@@ -62,11 +62,11 @@ static int all_symbols = 0;
62static int absolute_percpu = 0; 62static int absolute_percpu = 0;
63static int base_relative = 0; 63static int base_relative = 0;
64 64
65int token_profit[0x10000]; 65static int token_profit[0x10000];
66 66
67/* the table that holds the result of the compression */ 67/* the table that holds the result of the compression */
68unsigned char best_table[256][2]; 68static unsigned char best_table[256][2];
69unsigned char best_table_len[256]; 69static unsigned char best_table_len[256];
70 70
71 71
72static void usage(void) 72static void usage(void)
@@ -80,7 +80,7 @@ static void usage(void)
80 * This ignores the intensely annoying "mapping symbols" found 80 * This ignores the intensely annoying "mapping symbols" found
81 * in ARM ELF files: $a, $t and $d. 81 * in ARM ELF files: $a, $t and $d.
82 */ 82 */
83static inline int is_arm_mapping_symbol(const char *str) 83static int is_arm_mapping_symbol(const char *str)
84{ 84{
85 return str[0] == '$' && strchr("axtd", str[1]) 85 return str[0] == '$' && strchr("axtd", str[1])
86 && (str[2] == '\0' || str[2] == '.'); 86 && (str[2] == '\0' || str[2] == '.');
@@ -331,7 +331,7 @@ static void write_src(void)
331 unsigned int *markers; 331 unsigned int *markers;
332 char buf[KSYM_NAME_LEN]; 332 char buf[KSYM_NAME_LEN];
333 333
334 printf("#include <asm/types.h>\n"); 334 printf("#include <asm/bitsperlong.h>\n");
335 printf("#if BITS_PER_LONG == 64\n"); 335 printf("#if BITS_PER_LONG == 64\n");
336 printf("#define PTR .quad\n"); 336 printf("#define PTR .quad\n");
337 printf("#define ALGN .balign 8\n"); 337 printf("#define ALGN .balign 8\n");
@@ -596,9 +596,6 @@ static void insert_real_symbols_in_table(void)
596{ 596{
597 unsigned int i, j, c; 597 unsigned int i, j, c;
598 598
599 memset(best_table, 0, sizeof(best_table));
600 memset(best_table_len, 0, sizeof(best_table_len));
601
602 for (i = 0; i < table_cnt; i++) { 599 for (i = 0; i < table_cnt; i++) {
603 for (j = 0; j < table[i].len; j++) { 600 for (j = 0; j < table[i].len; j++) {
604 c = table[i].sym[j]; 601 c = table[i].sym[j];