mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-03-30 11:17:42 +08:00
objtool: Fix verbose disassembly if CROSS_COMPILE isn't set
In verbose mode, when printing the disassembly of affected functions, if
CROSS_COMPILE isn't set, the objdump command string gets prefixed with
"(null)".
Somehow this worked before. Maybe some versions of glibc return an
empty string instead of NULL. Fix it regardless.
[ jpoimboe: Rewrite commit log. ]
Fixes: ca653464dd ("objtool: Add verbose option for disassembling affected functions")
Signed-off-by: David Laight <david.laight.linux@gmail.com>
Signed-off-by: Josh Poimboeuf <jpoimboe@kernel.org>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Link: https://lore.kernel.org/r/20250215142321.14081-1-david.laight.linux@gmail.com
Link: https://lore.kernel.org/r/b931a4786bc0127aa4c94e8b35ed617dcbd3d3da.1743481539.git.jpoimboe@kernel.org
This commit is contained in:
committed by
Ingo Molnar
parent
3e7be63593
commit
e77956e4e5
@@ -4523,6 +4523,8 @@ static void disas_funcs(const char *funcs)
|
||||
char *cmd;
|
||||
|
||||
cross_compile = getenv("CROSS_COMPILE");
|
||||
if (!cross_compile)
|
||||
cross_compile = "";
|
||||
|
||||
objdump_str = "%sobjdump -wdr %s | gawk -M -v _funcs='%s' '"
|
||||
"BEGIN { split(_funcs, funcs); }"
|
||||
|
||||
Reference in New Issue
Block a user