Re: [PATCH v7 0/7] Add jump table support for objtool on LoongArch

From: Huacai Chen
Date: Sat Mar 08 2025 - 00:47:36 EST


Hi, Josh and Peter,

Since "unreachable: Unify", "x86: Convert unreachable() to BUG()" and
other relevant patches have been backported to 6.12/6.13, I think the
7th of this series should also be backported to avoid build warnings.

Since tip.git hasn't applied this series, I will apply the 7th patch
as part of loongarch-fixes now.

Huacai

On Tue, Feb 11, 2025 at 7:50 PM Tiezhu Yang <yangtiezhu@xxxxxxxxxxx> wrote:
>
> This version is based on tip/tip.git master branch [1], the patch
> "objtool: Handle unreachable entry of rodata" is dropped, tested
> with the latest mainline Binutils, GCC and Clang (2025-02-11).
>
> [1] https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git/log/?h=master
>
> Tiezhu Yang (7):
> objtool: Handle various symbol types of rodata
> objtool: Handle different entry size of rodata
> objtool: Handle PC relative relocation type
> objtool/LoongArch: Add support for switch table
> objtool/LoongArch: Add support for goto table
> LoongArch: Enable jump table for objtool
> LoongArch: Convert unreachable() to BUG()
>
> arch/loongarch/Kconfig | 3 +
> arch/loongarch/Makefile | 6 +-
> arch/loongarch/kernel/machine_kexec.c | 4 +-
> tools/objtool/arch/loongarch/decode.c | 28 ++-
> .../objtool/arch/loongarch/include/arch/elf.h | 7 +
> tools/objtool/arch/loongarch/special.c | 159 +++++++++++++++++-
> tools/objtool/arch/powerpc/decode.c | 15 ++
> tools/objtool/arch/x86/decode.c | 13 ++
> tools/objtool/check.c | 23 ++-
> tools/objtool/include/objtool/arch.h | 3 +
> 10 files changed, 247 insertions(+), 14 deletions(-)
>
> --
> 2.42.0
>