[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAPhsuW4hNABZRWiUrWzA6kbiiU1+LpnsSCaor=Wi8hrCzHwONQ@mail.gmail.com>
Date: Sat, 7 Sep 2024 10:43:10 -0700
From: Song Liu <song@...nel.org>
To: Josh Poimboeuf <jpoimboe@...nel.org>
Cc: live-patching@...r.kernel.org, linux-kernel@...r.kernel.org,
x86@...nel.org, Miroslav Benes <mbenes@...e.cz>, Petr Mladek <pmladek@...e.com>,
Joe Lawrence <joe.lawrence@...hat.com>, Jiri Kosina <jikos@...nel.org>,
Peter Zijlstra <peterz@...radead.org>, Marcos Paulo de Souza <mpdesouza@...e.com>
Subject: Re: [RFC 00/31] objtool, livepatch: Livepatch module generation
On Fri, Sep 6, 2024 at 11:46 PM Josh Poimboeuf <jpoimboe@...nel.org> wrote:
>
> On Tue, Sep 03, 2024 at 10:32:00AM -0700, Song Liu wrote:
> > +++ w/tools/objtool/elf.c
> > @@ -468,10 +468,8 @@ static void elf_add_symbol(struct elf *elf,
> > struct symbol *sym)
> > *
> > * TODO: is this still true?
> > */
> > -#if 0
> > - if (sym->type == STT_NOTYPE && !sym->len)
> > + if (sym->type == STT_NOTYPE && !sym->len && false)
> > __sym_remove(sym, &sym->sec->symbol_tree);
> > -#endif
>
> Song, can you explain this change? Was there a warning about
> __sym_remove() not being used? Not sure how that would be possible
> since it should be static inline:
>
> INTERVAL_TREE_DEFINE(struct symbol, node, unsigned long, __subtree_last,
> __sym_start, __sym_last, static inline, __sym)
> ^^^^^^^^^^^^^
>
clang gives the following:
elf.c:102:1: error: unused function '__sym_remove' [-Werror,-Wunused-function]
102 | INTERVAL_TREE_DEFINE(struct symbol, node, unsigned long, __subtree_last,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
103 | __sym_start, __sym_last, static inline, __sym)
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/data/users/songliubraving/kernel/linux-git/tools/include/linux/interval_tree_generic.h:65:15:
note: expanded from macro 'INTERVAL_TREE_DEFINE'
65 | ITSTATIC void ITPREFIX ## _remove(ITSTRUCT *node,
\
| ^~~~~~~~~~~~~~~~~~~
<scratch space>:155:1: note: expanded from here
155 | __sym_remove
| ^~~~~~~~~~~~
1 error generated.
gcc didn't complain here.
Thanks,
Song
Powered by blists - more mailing lists