objtool: Allow arch code to discover jump table size
authorArd Biesheuvel <ardb@kernel.org>
Fri, 11 Oct 2024 17:08:50 +0000 (19:08 +0200)
committerPeter Zijlstra <peterz@infradead.org>
Mon, 2 Dec 2024 11:24:29 +0000 (12:24 +0100)
commitc3cb6c158c64dc39838208d51dcd06d1990b371d
tree9ef9e5ed45de26f53bc839aeaac057ff04ce1b93
parente7e0eb53c2f0f68fe2577472ce2802a4efd9d7ce
objtool: Allow arch code to discover jump table size

In preparation for adding support for annotated jump tables, where
ELF relocations and symbols are used to describe the locations of jump
tables in the executable, refactor the jump table discovery logic so the
table size can be returned from arch_find_switch_table().

Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Link: https://lkml.kernel.org/r/20241011170847.334429-12-ardb+git@google.com
tools/objtool/arch/loongarch/special.c
tools/objtool/arch/powerpc/special.c
tools/objtool/arch/x86/special.c
tools/objtool/check.c
tools/objtool/include/objtool/check.h
tools/objtool/include/objtool/special.h