Skip to content

Commit bea5b74

Browse files
arndbmasahir0y
authored andcommitted
kallsyms: expand symbol name into comment for debugging
The assembler output of kallsyms.c is not meant for people to understand, and is generally not helpful when debugging "Inconsistent kallsyms data" warnings. I have previously struggled with these, but found it helpful to list which symbols changed between the first and second pass in the .tmp_vmlinux.kallsyms*.S files. As this file is preprocessed, it's possible to add a C-style multiline comment with the full type/name tuple. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
1 parent 6a8f57a commit bea5b74

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

scripts/kallsyms.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -525,7 +525,8 @@ static void write_src(void)
525525
table[i]->addr);
526526
exit(EXIT_FAILURE);
527527
}
528-
printf("\t.long\t%#x\n", (int)offset);
528+
expand_symbol(table[i]->sym, table[i]->len, buf);
529+
printf("\t.long\t%#x /* %s */\n", (int)offset, buf);
529530
} else if (!symbol_absolute(table[i])) {
530531
output_address(table[i]->addr);
531532
} else {

0 commit comments

Comments
 (0)