| From: |
| Tiezhu Yang <yangtiezhu-AT-loongson.cn> |
| To: |
| Huacai Chen <chenhuacai-AT-kernel.org>, Josh Poimboeuf <jpoimboe-AT-kernel.org>, Peter Zijlstra <peterz-AT-infradead.org> |
| Subject: |
| [PATCH v6 0/9] Add jump table support for objtool on LoongArch |
| Date: |
| Tue, 17 Dec 2024 09:08:56 +0800 |
| Message-ID: |
| <20241217010905.13054-1-yangtiezhu@loongson.cn> |
| Cc: |
| loongarch-AT-lists.linux.dev, amd-gfx-AT-lists.freedesktop.org, linux-kernel-AT-vger.kernel.org |
| Archive-link: |
| Article |
This version is based on tip/tip.git objtool/core branch [1], add some weak
and arch-specific functions to make the generic code more readable, tested
with the latest upstream mainline Binutils, GCC and Clang.
The first 6 patches are preparation for patch #7 to enable jump table for
objtool on LoongArch, the last 2 patches are small enough to fix objtool
warnings "funcA() falls through to next function funcB()", one is under
arch/loongarch and the other is under drm/amd/display.
v6:
-- Add arch_reloc_size() for x86 and ppc.
-- Call arch_reloc_size() directly in add_jump_table().
-- Refine arch_adjust_offset() for LoongArch.
-- Rename arch_adjust_offset() to arch_jump_table_sym_offset().
-- Get each table size of rodata in time for switch table.
-- Update the commit message to make it more clear.
[1] https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.g...
Tiezhu Yang (9):
objtool: Handle various symbol types of rodata
objtool: Handle different entry size of rodata
objtool: Handle PC relative relocation type
objtool: Handle unreachable entry of rodata
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()
drm/amd/display: Mark dc_fixpt_from_fraction() noinline
arch/loongarch/Kconfig | 3 +
arch/loongarch/Makefile | 6 +-
arch/loongarch/kernel/machine_kexec.c | 4 +-
.../drm/amd/display/dc/basics/fixpt31_32.c | 2 +-
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 | 28 ++-
tools/objtool/include/objtool/arch.h | 3 +
11 files changed, 251 insertions(+), 17 deletions(-)
--
2.42.0