From: Tiezhu Yang <yangtiezhu@loongson.cn>
To: Xi Ruoyao <xry111@xry111.site>, Peter Zijlstra <peterz@infradead.org>
Cc: Huacai Chen <chenhuacai@kernel.org>,
Josh Poimboeuf <jpoimboe@kernel.org>,
loongarch@lists.linux.dev, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 5/5] LoongArch: Enable jump table with GCC for objtool
Date: Tue, 12 Nov 2024 20:26:56 +0800 [thread overview]
Message-ID: <7e8adb0b-e681-72ae-40d8-740dc3f9480b@loongson.cn> (raw)
In-Reply-To: <9589c5b673f45f02e2b0fa9d9a96eff0f0df0920.camel@xry111.site>
On 11/12/2024 11:15 AM, Xi Ruoyao wrote:
> On Wed, 2024-11-06 at 13:03 +0800, Tiezhu Yang wrote:
>> On 11/05/2024 10:15 PM, Peter Zijlstra wrote:
>>> On Tue, Nov 05, 2024 at 08:39:06PM +0800, Tiezhu Yang wrote:
>>>> For now, it is time to remove the compiler option -fno-jump-tables
>>>> to enable jump table for objtool if the compiler is GCC and it has
>>>> the compiler option -mannotate-tablejump, otherwise still keep the
>>>> compiler option -fno-jump-tables to maintain compatibility with the
>>>> older compilers.
...
>> ifdef CONFIG_CC_HAS_ANNOTATE_TABLEJUMP
>> KBUILD_CFLAGS += $(call cc-option,-mannotate-tablejump)
>> else
>> KBUILD_CFLAGS += -fno-jump-tables
>> endif
>
> Has -mannotate-tablejump been added to Clang?
Yes.
> IMO it's better to add it
> to Clang first, and add Clang & GCC support at once into objtool.
Looks reasonable, the fact is that there are some corner issues
compiled with Clang due to different compiler behaviors, most of
the issues have been addressed and I need to do more test, I will
send v3 with about 10 patches after the coming merge window.
Thanks,
Tiezhu
next prev parent reply other threads:[~2024-11-12 12:27 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-05 12:39 [PATCH v2 0/5] Add jump table support for objtool on LoongArch Tiezhu Yang
2024-11-05 12:39 ` [PATCH v2 1/5] objtool: Handle various symbol types for rodata Tiezhu Yang
2024-11-05 12:39 ` [PATCH v2 2/5] objtool: Handle special cases of discard.reachable Tiezhu Yang
2024-11-05 12:39 ` [PATCH v2 3/5] objtool/LoongArch: Add support for switch table Tiezhu Yang
2024-11-05 12:39 ` [PATCH v2 4/5] objtool/LoongArch: Add support for goto table Tiezhu Yang
2024-11-05 12:39 ` [PATCH v2 5/5] LoongArch: Enable jump table with GCC for objtool Tiezhu Yang
2024-11-05 14:15 ` Peter Zijlstra
2024-11-06 5:03 ` Tiezhu Yang
2024-11-12 3:15 ` Xi Ruoyao
2024-11-12 12:26 ` Tiezhu Yang [this message]
2024-11-13 21:11 ` annotating jump tables (Re: [PATCH v2 5/5] LoongArch: Enable jump table with GCC for objtool) Josh Poimboeuf
2024-11-14 17:13 ` Nick Desaulniers
2024-11-14 18:13 ` Ard Biesheuvel
2024-11-28 0:56 ` Josh Poimboeuf
2024-11-05 12:47 ` [PATCH v2 0/5] Add jump table support for objtool on LoongArch Huacai Chen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=7e8adb0b-e681-72ae-40d8-740dc3f9480b@loongson.cn \
--to=yangtiezhu@loongson.cn \
--cc=chenhuacai@kernel.org \
--cc=jpoimboe@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=loongarch@lists.linux.dev \
--cc=peterz@infradead.org \
--cc=xry111@xry111.site \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®