[CAULDRON] Topics for the Toolchain and Linux kernel BoF
Sam James
sam@gentoo.org
Sat Sep 28 11:03:48 GMT 2024
"Jose E. Marchesi" <jose.marchesi@oracle.com> writes:
>> Xi Ruoyao <xry111@xry111.site> writes:
>>
>>> On Mon, 2024-09-23 at 08:02 +0100, Sam James wrote:
>>>> Xi Ruoyao <xry111@xry111.site> writes:
>>>>
>>>> > On Thu, 2024-09-12 at 18:13 +0200, Jose E. Marchesi wrote:
>>>> > > - "noreturn" and jump tables run-time hints
>>>> > >
>>>> > > It has been expressed on the kernel side the desire of having the C compiler
>>>> > > emit run-time hints marking functions that are not supposed to return and
>>>> > > also to provide annotations on jump tables. This is for the benefit of
>>>> > > objtool in arm64, see references below.
>>>> > >
>>>> > > Goal of the discussion:
>>>> > >
>>>> > > Collect and assess the requirements of these features, discuss their
>>>> > > pertinence and the way it could be best implemented. The outcome of the
>>>> > > discussion will then be used to continue the discussion with the clang/llvm
>>>> > > and kernel hackers at LPC.
>>>> > >
>>>> > > References:
>>>> > > https://lore.kernel.org/linux-arm-kernel/YyLmhUxTUaNzaieC@hirez.programming.kicks-ass.net/
>>>> >
>>>> > FWIW we are having very similar issues for using objtool in loongarch.
>>>> > And we also hit a similar issue with table-based computed goto. I'm not
>>>> > sure if the computed goto is an issue for arm64 either.
>>>>
>>>> I brought it up briefly on your behalf.
>>>>
>>>> >
>>>> > Some related materials:
>>>> >
>>>> > - https://gcc.gnu.org/PR82365#c13
>>>> > - https://gcc.gnu.org/PR116483
>>>> > - https://gcc.gnu.org/pipermail/gcc-patches/2024-July/657641.html
>>>> > (Nacked off-line)
>>>
>>> Is there's something conclusive from the meeting? I was busy on
>>> $RANDOM_MESSY_THINGS last week and had not noticed it before.
>>
>> Sorry, this fell out of my inbox. I don't remember the details -- it was
>> only a quick interjection and the discussion was moving on through the
>> remaining topics. I _think_ we ended up talking a bit about SFrames and
>> about how there's a kind of tangential need for this sort of thing there
>> too but I might be making that up.
>>
>> Jose, do you have any notes about it? (Or maybe Indu?)
>
> As far as I remember:
>
> Maciej suggested to look at the MIPS GCC backend, because he remembers
> doing something to mark jump tables. Me and Josh looked after the
> meeting, and sure enough, the MIPS backend does that when it emits
> compact instructions. It uses a couple of symbols, so there is a
> precedent.
>
> Other people suggested to use a GCC plugin to do this. Jakub followed
> up on this idea in a thread in gcc@gcc.gnu.og post-conference. See
> https://gcc.gnu.org/pipermail/gcc/2024-September/244796.html.
Thank you! I'd missed Jakub's post and that definitely sounds
right. Sorry for forgetting :(
More information about the Binutils
mailing list