From d37c90d47fc4657423d2ff1c3ed3fd70612a9b43 Mon Sep 17 00:00:00 2001 From: Matt Helsley Date: Tue, 19 May 2020 13:55:32 -0700 Subject: objtool: Move struct objtool_file into arch-independent header The objtool_file structure describes the files objtool works on, is used by the check subcommand, and the check.h header is included by the orc subcommands so it's presently used by all subcommands. Since the structure will be useful in all subcommands besides check, and some subcommands may not want to include check.h to get the definition, split the structure out into a new header meant for use by all objtool subcommands. Signed-off-by: Matt Helsley Reviewed-by: Julien Thierry Signed-off-by: Josh Poimboeuf --- tools/objtool/objtool.h | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 tools/objtool/objtool.h (limited to 'tools/objtool/objtool.h') diff --git a/tools/objtool/objtool.h b/tools/objtool/objtool.h new file mode 100644 index 000000000000..d89616b2ca39 --- /dev/null +++ b/tools/objtool/objtool.h @@ -0,0 +1,22 @@ +/* SPDX-License-Identifier: GPL-2.0-or-later */ +/* + * Copyright (C) 2020 Matt Helsley + */ + +#ifndef _OBJTOOL_H +#define _OBJTOOL_H + +#include +#include +#include + +#include "elf.h" + +struct objtool_file { + struct elf *elf; + struct list_head insn_list; + DECLARE_HASHTABLE(insn_hash, 20); + bool ignore_unreachables, c_file, hints, rodata; +}; + +#endif /* _OBJTOOL_H */ -- cgit v1.2.3