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?
IMO it's better to add it
to Clang first, and add Clang & GCC support at once into objtool.