Re: [PATCH v2 2/2] objtool: dead_end function change for split functions

From: Josh Poimboeuf
Date: Mon Nov 17 2025 - 18:23:51 EST


On Mon, Nov 17, 2025 at 02:57:02PM -0800, Rong Xu wrote:
> Josh,
>
> You're right, your fix makes a lot of sense. I wasn't aware that the
> split function was already handled for GCC.

FYI, GCC puts its cold functions in .text.unlikely[.*] rather than
.text.split.*. And it does so automatically, without
-fsplit-machine-functions.

> Yes, clang sets the split part of the function as STT_NOTYPE, which is
> different from GCC.
>
> I assume you will post the new patches (together with other fixes for
> clang's split function) soon. Any time line?
>
> Also how about the other patch in this patch set. Does that make sense?

I think patch 1/2 looked ok, let me go stare at it again.

> Thanks for the advice on getting rid of objtool warnings in our
> builds! We tried but it's hard to get rid of all the warnings. But
> I'll keep close eyes on these unreachable code warnings.

Here's my work in progress:

git://git.kernel.org/pub/scm/linux/kernel/git/jpoimboe/linux.git objtool-split-fix

I hope to post the patches in a day or so if the bots don't complain.

If they don't fix all your warnings, let me know and I can help look.

--
Josh