[PATCH v2 0/5] Add jump table support for objtool on LoongArch

From: Tiezhu Yang
Date: Tue Nov 05 2024 - 07:39:18 EST


This series is based on 6.12-rc6, tested with the upstream mainline
binutils, GCC and Clang, all the changes are under tools/objtool and
arch/loongarch.

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, the next work is to add the corresponding
support with Clang after addressing some corner issues due to different
compiler behaviors.

Tiezhu Yang (5):
objtool: Handle various symbol types for rodata
objtool: Handle special cases of discard.reachable
objtool/LoongArch: Add support for switch table
objtool/LoongArch: Add support for goto table
LoongArch: Enable jump table with GCC for objtool

arch/loongarch/Kconfig | 3 +
arch/loongarch/Makefile | 9 +++
tools/objtool/arch/loongarch/special.c | 83 +++++++++++++++++++++++++-
tools/objtool/check.c | 38 ++++++++++--
4 files changed, 128 insertions(+), 5 deletions(-)

--
2.42.0