提交 f3462aa9 编写于 作者: A Andi Kleen 提交者: Michal Marek

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: NAndi Kleen <ak@linux.intel.com>
Signed-off-by: NMichal Marek <mmarek@suse.cz>
上级 eea0e9cb
......@@ -27,7 +27,7 @@
#define ARRAY_SIZE(arr) (sizeof(arr) / sizeof(arr[0]))
#endif
#define KSYM_NAME_LEN 128
#define KSYM_NAME_LEN 255
struct sym_entry {
unsigned long long addr;
......@@ -111,6 +111,12 @@ static int read_symbol(FILE *in, struct sym_entry *s)
fprintf(stderr, "Read error or end of file.\n");
return -1;
}
if (strlen(str) > KSYM_NAME_LEN) {
fprintf(stderr, "Symbol %s too long for kallsyms (%lu vs %d).\n"
"Please increase KSYM_NAME_LEN both in kernel and kallsyms.c\n",
str, strlen(str), KSYM_NAME_LEN);
return -1;
}
sym = str;
/* skip prefix char */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册