objtool: Refactor jump table code to support other architectures
authorRaphael Gault <raphael.gault@arm.com>
Fri, 4 Sep 2020 15:30:24 +0000 (16:30 +0100)
committerJosh Poimboeuf <jpoimboe@redhat.com>
Thu, 10 Sep 2020 15:43:13 +0000 (10:43 -0500)
commitd871f7b5a6a2a30f4eba577fd56941fa3657e394
treee5eb59adf65e56f36dbd79dbfbdefa8f32751659
parent45245f51f9a4b9a883a8c94468473c1de9b88153
objtool: Refactor jump table code to support other architectures

The way to identify jump tables and retrieve all the data necessary to
handle the different execution branches is not the same on all
architectures.  In order to be able to add other architecture support,
define an arch-dependent function to process jump-tables.

Reviewed-by: Miroslav Benes <mbenes@suse.cz>
Signed-off-by: Raphael Gault <raphael.gault@arm.com>
[J.T.: Move arm64 bits out of this patch,
       Have only one function to find the start of the jump table,
       for now assume that the jump table format will be the same as
       x86]
Signed-off-by: Julien Thierry <jthierry@redhat.com>
Signed-off-by: Josh Poimboeuf <jpoimboe@redhat.com>
tools/objtool/arch/x86/special.c
tools/objtool/check.c
tools/objtool/check.h
tools/objtool/special.h