Re: [PATCH 2/2] objtool: Fix code relocs vs weak symbols

From: Peter Zijlstra
Date: Wed Apr 20 2022 - 02:57:34 EST


On Tue, Apr 19, 2022 at 07:16:01PM -0700, Josh Poimboeuf wrote:
> On Tue, Apr 19, 2022 at 10:32:56PM +0200, Peter Zijlstra wrote:
> > + /* XXX create ? */
> > + if (symtab_shndx) {
>
> Not sure what this comment means?

I'm not sure if we will trip the case where the input ELF will not
have/need the extended table, but our output file would need it.

That said, upon thinking about it this morning, it wouldn't be this code
path triggering it I think.

Specifically, we only create section symbols for text sections and
objtool doesn't generate text sections (you've talked me out of that).
So the number of text sections doesn't change, so section index number
shouldn't increase due to all this.