Re: [RFC 00/31] objtool, livepatch: Livepatch module generation

From: Song Liu
Date: Mon Sep 09 2024 - 17:44:01 EST


On Mon, Sep 9, 2024 at 2:19 PM Josh Poimboeuf <jpoimboe@xxxxxxxxxx> wrote:
>
> On Sat, Sep 07, 2024 at 10:04:25PM -0700, Song Liu wrote:
> > I think gcc doesn't complain, but clang does:
> >
> > $ cat ttt.c
> > static inline void ret(void)
> > {
> > return;
> > }
> >
> > int main(void)
> > {
> > return 0;
> > }
>
> Ah... That's probably why the kernel adds "__maybe_unused" to its
> inline macro (which the tools don't have).
>
> Does this fix?

Yes! It fixes this problem.

Thanks,
Song