Re: [PATCH 04/14] objtool/x86: Add .tail_call_sites
From: Josh Poimboeuf
Date: Thu Oct 10 2024 - 00:55:57 EST
On Wed, Oct 09, 2024 at 05:25:03PM +0200, Peter Zijlstra wrote:
> On Fri, Sep 27, 2024 at 04:42:47PM -0700, Josh Poimboeuf wrote:
> > On Fri, Sep 27, 2024 at 09:49:00PM +0200, Peter Zijlstra wrote:
> > > @@ -893,7 +893,6 @@ static int create_cfi_sections(struct ob
> > >
> > > sec = find_section_by_name(file->elf, ".cfi_sites");
> > > if (sec) {
> > > - INIT_LIST_HEAD(&file->call_list);
> >
> > Hm, why exactly are we re-initing the list head anyway in these
> > boilerplate create_*_sections() functions? I'm guessing that backfired
> > here. I can't figure out a reason why we'd doing that anyway.
>
> Yeah, I can't remember where that came from, nor why I removed this
> particular one :/
I think you removed this one because file->call_list is also used by
create_direct_call_sections() so it's not wise to clear it if it was
already initalized and needed for another purpose.
>
> > I'm also wondering why we made these boilerplate function names plural
> > "sections" when they only create a single section :-)
>
> Because elf_create_section_pair() creates two section_s_, right?
Ah right.
--
Josh