summaryrefslogtreecommitdiff
path: root/tools/objtool/special.c
diff options
context:
space:
mode:
authorJulien Thierry <jthierry@redhat.com>2020-09-04 18:30:21 +0300
committerJosh Poimboeuf <jpoimboe@redhat.com>2020-09-10 18:43:13 +0300
commitc8ea0d672521ef663f0f9a77faa94d0d47102d77 (patch)
tree5f8a0ec400abdbc6c4ae035721a9e5b017426230 /tools/objtool/special.c
parentbb090fdb70ecc51c91e1d86345adae064caa06c8 (diff)
downloadlinux-c8ea0d672521ef663f0f9a77faa94d0d47102d77.tar.xz
objtool: Move macros describing structures to arch-dependent code
Some macros are defined to describe the size and layout of structures exception_table_entry, jump_entry and alt_instr. These values can vary from one architecture to another. Have the values be defined by arch specific code. Suggested-by: Raphael Gault <raphael.gault@arm.com> Reviewed-by: Miroslav Benes <mbenes@suse.cz> Signed-off-by: Julien Thierry <jthierry@redhat.com> Signed-off-by: Josh Poimboeuf <jpoimboe@redhat.com>
Diffstat (limited to 'tools/objtool/special.c')
-rw-r--r--tools/objtool/special.c16
1 files changed, 1 insertions, 15 deletions
diff --git a/tools/objtool/special.c b/tools/objtool/special.c
index e893f1e48e44..b04f395de5de 100644
--- a/tools/objtool/special.c
+++ b/tools/objtool/special.c
@@ -14,21 +14,7 @@
#include "builtin.h"
#include "special.h"
#include "warn.h"
-
-#define EX_ENTRY_SIZE 12
-#define EX_ORIG_OFFSET 0
-#define EX_NEW_OFFSET 4
-
-#define JUMP_ENTRY_SIZE 16
-#define JUMP_ORIG_OFFSET 0
-#define JUMP_NEW_OFFSET 4
-
-#define ALT_ENTRY_SIZE 13
-#define ALT_ORIG_OFFSET 0
-#define ALT_NEW_OFFSET 4
-#define ALT_FEATURE_OFFSET 8
-#define ALT_ORIG_LEN_OFFSET 10
-#define ALT_NEW_LEN_OFFSET 11
+#include "arch_special.h"
#define X86_FEATURE_POPCNT (4*32+23)
#define X86_FEATURE_SMAP (9*32+20)