Re: [PATCH 1/1] objdump: Fix disassembly if CROSS_COMPILE not set

From: Josh Poimboeuf
Date: Thu Feb 20 2025 - 17:12:51 EST


On Thu, Feb 20, 2025 at 02:11:59PM -0800, Josh Poimboeuf wrote:
> On Sat, Feb 15, 2025 at 02:23:21PM +0000, David Laight wrote:
> > 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 "".
> >
> > Fixes: ca653464dd097 ("objtool: Add verbose option for disassembling affected functions")
> > Signed-off-by: David Laight <david.laight.linux@xxxxxxxxx>
> > ---
> > tools/objtool/check.c | 2 ++
> > 1 file changed, 2 insertions(+)
> >
> > diff --git a/tools/objtool/check.c b/tools/objtool/check.c
> > index 753dbc4f8198..c1b771e772fd 100644
> > --- a/tools/objtool/check.c
> > +++ b/tools/objtool/check.c
> > @@ -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:
>
> Acked-by: Josh Poimboeuf <jpoimboe@xxxxxxxxxx>
>
> Peter, can you take this one?

With s/objdump/objtool/ in subject :-)

--
Josh