summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2023-03-06 11:14:51 +0100
committerMasahiro Yamada <masahiroy@kernel.org>2023-04-17 11:03:56 +0900
commitbea5b74504742f1b51b815bcaf9a70bddbc49ce3 (patch)
treeebcb915b357f5f6000f3982030d33380327bcd80 /scripts
parent6a8f57ae2eb07ab39a6f0ccad60c760743051026 (diff)
downloadlinux-stable-bea5b74504742f1b51b815bcaf9a70bddbc49ce3.tar.gz
linux-stable-bea5b74504742f1b51b815bcaf9a70bddbc49ce3.tar.bz2
linux-stable-bea5b74504742f1b51b815bcaf9a70bddbc49ce3.zip
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>
Diffstat (limited to 'scripts')
-rw-r--r--scripts/kallsyms.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/scripts/kallsyms.c b/scripts/kallsyms.c
index a239a87e7bec..ea1e3d3aaa6b 100644
--- a/scripts/kallsyms.c
+++ b/scripts/kallsyms.c
@@ -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 {