[RFC PATCH 0/4] Add jump table support for objtool on LoongArch

From: Tiezhu Yang
Date: Fri Jul 12 2024 - 05:15:19 EST


This RFC version is based on Linux 6.10-rc7, there are no detailed
commit messages for each patch for now and the code are relatively
clear and simple.

This series is tested with the latest upstream gcc applied with patch
"LoongArch: Add support to annotate tablejump" [1] which adds a new
section discard.tablejump_annotate to record the jump info, it makes
life much easier, special thanks to Ruoyao.

I will address all the review comments and update the commit messages
after the merge window.

[1] https://inbox.sourceware.org/gcc-patches/20240711114415.4420-1-xry111@xxxxxxxxxxx/

Tiezhu Yang (4):
objtool: Check local label in find_jump_table()
objtool: Check various types in add_jump_table()
objtool/LoongArch: Add support for jump table
LoongArch: Remove -fno-jump-tables for objtool

arch/loongarch/Kconfig | 8 +++-
arch/loongarch/Makefile | 6 +--
tools/objtool/arch/loongarch/special.c | 54 +++++++++++++++++++++++++-
tools/objtool/check.c | 36 +++++++++++++++--
4 files changed, 94 insertions(+), 10 deletions(-)

--
2.42.0