Re: [PATCH 5/9] objtool: Rework rebuild_reloc logic

From: Josh Poimboeuf
Date: Fri Mar 19 2021 - 11:16:50 EST


On Fri, Mar 19, 2021 at 10:22:54AM +0100, Peter Zijlstra wrote:
> @@ -814,6 +814,11 @@ struct section *elf_create_reloc_section
> }
> }
>
> +static inline bool is_reloc_section(struct section *reloc)
> +{
> + return reloc->base && reloc->base->reloc == reloc;
> +}

I believe the 2nd condition will always be true, so it can just be
'return reloc->base'.

--
Josh