objdump: Fix disassembly if CROSS_COMPILE not set
PATCH 1/1 objdump: Fix disassembly if CROSS_COMPILE not set
If CROSS_COMPILE isn't set and -v specified the code tries to run
system("(null)objdump ....")which really doesn't work very well.
Fix by changing NULL to "".
--- tools/objtool/check.c | 2 ++ 1 file changed, 2 insertions(+)
tools/objtool/check.c +2 -0
@@ -4506,6 +4506,8 @@ static int 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); }"
Signature · 1 line
2.39.5
Quoted 16 lines · David Laight
If
CROSS_COMPILEisn't set and -v specified the code tries to runsystem("(null)objdump ....")which really doesn't work very well.
Fix by changing NULL to "".Fixes ca653464dd097 ("objtool: Add verbose option for disassembling affected functions")Signed-off-by David Laight <[email protected]>--- tools/objtool/check.c | 2 ++ 1 file changed, 2 insertions(+)tools/objtool/check.c +0
-0
tools/objtool/check.c static int disas_funcs(const char *funcs) · line 4510
Quoted 5 lines
tools/objtool/check.c +2
-0@@ -4506,6 +4506,8 @@ static int disas_funcs(const char *funcs)char *cmd; cross_compile =getenv ("CROSS_COMPILE" ); +if (!cross_compile) + cross_compile ="" ;
Makes sense, I'm not sure how this works for me already? Regardless:
Peter, can you take this one?
Signature · 1 line
Josh
Josh Poimboeuf
maintainerQuoted 25 lines · Josh Poimboeuf
Quoted 16 lines · David Laight
If
CROSS_COMPILEisn't set and -v specified the code tries to runsystem("(null)objdump ....")which really doesn't work very well.
Fix by changing NULL to "".Fixes ca653464dd097 ("objtool: Add verbose option for disassembling affected functions")Signed-off-by David Laight <[email protected]>--- tools/objtool/check.c | 2 ++ 1 file changed, 2 insertions(+)tools/objtool/check.c +0
-0tools/objtool/check.c static int disas_funcs(const char *funcs) · line 4510
Quoted 5 lines
tools/objtool/check.c +2
-0@@ -4506,6 +4506,8 @@ static int disas_funcs(const char *funcs)char *cmd; cross_compile =getenv ("CROSS_COMPILE" ); +if (!cross_compile) + cross_compile ="" ;Makes sense, I'm not sure how this works for me already? Regardless:
Quoted 3 lines
Acked-by Josh Poimboeuf <[email protected]>Peter, can you take this one?
With s/objdump/objtool/ in subject :-)
Signature · 1 line
Josh