Commit bea5b745 authored by Arnd Bergmann's avatar Arnd Bergmann Committed by Masahiro Yamada

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: default avatarArnd Bergmann <arnd@arndb.de>
Signed-off-by: default avatarMasahiro Yamada <masahiroy@kernel.org>
parent 6a8f57ae
......@@ -525,7 +525,8 @@ static void write_src(void)
table[i]->addr);
exit(EXIT_FAILURE);
}
printf("\t.long\t%#x\n", (int)offset);
expand_symbol(table[i]->sym, table[i]->len, buf);
printf("\t.long\t%#x /* %s */\n", (int)offset, buf);
} else if (!symbol_absolute(table[i])) {
output_address(table[i]->addr);
} else {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment