diff options
author | Julien Thierry <jthierry@redhat.com> | 2020-08-25 15:47:39 +0300 |
---|---|---|
committer | Josh Poimboeuf <jpoimboe@redhat.com> | 2020-09-02 01:19:07 +0300 |
commit | 6545eb030e6f14cef8793a86312483c788eaee46 (patch) | |
tree | 19301101e41edf3595fd3a5ceaa5d7804abc3821 /tools/objtool/objtool.h | |
parent | 7c9903c9bf716d89b34f96cc2ed64e28dabf570b (diff) | |
download | linux-6545eb030e6f14cef8793a86312483c788eaee46.tar.xz |
objtool: Move object file loading out of check()
Structure objtool_file can be used by different subcommands. In fact
it already is, by check and orc.
Provide a function that allows to initialize objtool_file, that builtin
can call, without relying on check to do the correct setup for them and
explicitly hand the objtool_file to them.
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/objtool.h')
-rw-r--r-- | tools/objtool/objtool.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/tools/objtool/objtool.h b/tools/objtool/objtool.h index 9a7cd0b88bd8..7efc43f22174 100644 --- a/tools/objtool/objtool.h +++ b/tools/objtool/objtool.h @@ -20,7 +20,9 @@ struct objtool_file { bool ignore_unreachables, c_file, hints, rodata; }; -int check(const char *objname, bool orc); +struct objtool_file *objtool_open_read(const char *_objname); + +int check(struct objtool_file *file, bool orc); int orc_dump(const char *objname); int create_orc(struct objtool_file *file); int create_orc_sections(struct objtool_file *file); |