aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/kallsyms.c
diff options
context:
space:
mode:
authorAndi Kleen <andi@firstfloor.org>2013-10-23 09:07:53 -0400
committerMichal Marek <mmarek@suse.cz>2013-11-06 16:25:49 -0500
commitf3462aa952cfc8f4b095103cb9b3d306dd216558 (patch)
treeb510eefc6acf6a88e79e4aa586cdb8d48f25df6b /scripts/kallsyms.c
parenteea0e9cbb9e65cd553d302a4aefd4c7b70d9fd90 (diff)
Kbuild: Handle longer symbols in kallsyms.c
Also warn for too long symbols v2: Add missing newline. Use 255 max (Joe Perches) Signed-off-by: Andi Kleen <ak@linux.intel.com> Signed-off-by: Michal Marek <mmarek@suse.cz>
Diffstat (limited to 'scripts/kallsyms.c')
-rw-r--r--scripts/kallsyms.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/scripts/kallsyms.c b/scripts/kallsyms.c
index 487ac6f37ca2..967522ab4f39 100644
--- a/scripts/kallsyms.c
+++ b/scripts/kallsyms.c
@@ -27,7 +27,7 @@
27#define ARRAY_SIZE(arr) (sizeof(arr) / sizeof(arr[0])) 27#define ARRAY_SIZE(arr) (sizeof(arr) / sizeof(arr[0]))
28#endif 28#endif
29 29
30#define KSYM_NAME_LEN 128 30#define KSYM_NAME_LEN 255
31 31
32struct sym_entry { 32struct sym_entry {
33 unsigned long long addr; 33 unsigned long long addr;
@@ -111,6 +111,12 @@ static int read_symbol(FILE *in, struct sym_entry *s)
111 fprintf(stderr, "Read error or end of file.\n"); 111 fprintf(stderr, "Read error or end of file.\n");
112 return -1; 112 return -1;
113 } 113 }
114 if (strlen(str) > KSYM_NAME_LEN) {
115 fprintf(stderr, "Symbol %s too long for kallsyms (%lu vs %d).\n"
116 "Please increase KSYM_NAME_LEN both in kernel and kallsyms.c\n",
117 str, strlen(str), KSYM_NAME_LEN);
118 return -1;
119 }
114 120
115 sym = str; 121 sym = str;
116 /* skip prefix char */ 122 /* skip prefix char */