Re: [PATCH 1/5] objtool: Add '--verbose' option for disassembling affected functions

From: Miroslav Benes
Date: Tue Mar 28 2023 - 04:47:32 EST


> +static inline void objdump_func(struct section *sec, unsigned long offset)
> +{
> + struct symbol *sym = find_func_containing(sec, offset);

Unnecessary assignment?

> + const char *script_relative = "scripts/objdump-func";
> + bool is_text = (sec->sh.sh_flags & SHF_EXECINSTR);
> + char *cmd, *srctree, *script;
> +
> + if (is_text)
> + sym = find_func_containing(sec, offset);
> + if (!sym)
> + sym = find_symbol_containing(sec, offset);
> + if (!sym)
> + return;

Miroslav