Re: build failure after commit eb0481bbc4ce ("objtool: Fix reloc_hash size")

From: Josh Poimboeuf
Date: Wed Jun 28 2023 - 14:10:27 EST


On Wed, Jun 28, 2023 at 07:26:59PM +0200, Michal Kubecek wrote:
> I digged some more and my guess is that the problem is that
> elf_open_read() does
>
> memset(elf, 0, offsetof(struct elf, sections));
>
> but commit eb0481bbc4ce ("objtool: Fix reloc_hash size") added
> num_relocs after sections so that it is not zeroed (0xbabababababababa
> is probably some kind of poison).

Argh, that memset() is subtle as heck. Peter, why?!?

--
Josh