objtool: Refactor ORC section generation

Decouple ORC entries from instructions.  This simplifies the
control/data flow, and is going to make it easier to support alternative
instructions which change the stack layout.

Signed-off-by: Josh Poimboeuf <jpoimboe@redhat.com>
This commit is contained in:
Josh Poimboeuf
2020-12-17 15:02:42 -06:00
parent 5ed934e57e
commit ab4e0744e9
7 changed files with 146 additions and 165 deletions

View File

@@ -11,10 +11,6 @@
#include <objtool/objtool.h>
#include <objtool/cfi.h>
#ifdef INSN_USE_ORC
#include <asm/orc_types.h>
#endif
enum insn_type {
INSN_JUMP_CONDITIONAL,
INSN_JUMP_UNCONDITIONAL,

View File

@@ -43,9 +43,6 @@ struct instruction {
struct symbol *func;
struct list_head stack_ops;
struct cfi_state cfi;
#ifdef INSN_USE_ORC
struct orc_entry orc;
#endif
};
static inline bool is_static_jump(struct instruction *insn)

View File

@@ -26,7 +26,6 @@ struct objtool_file *objtool_open_read(const char *_objname);
int check(struct objtool_file *file);
int orc_dump(const char *objname);
int create_orc(struct objtool_file *file);
int create_orc_sections(struct objtool_file *file);
int orc_create(struct objtool_file *file);
#endif /* _OBJTOOL_H */