diff options
author | Julien Thierry <jthierry@redhat.com> | 2020-08-25 13:47:40 +0100 |
---|---|---|
committer | Josh Poimboeuf <jpoimboe@redhat.com> | 2020-09-01 17:19:11 -0500 |
commit | d44becb9decf4438d1e555b1428634964d2e5764 (patch) | |
tree | 51216eb474b58554435a0790ac60305a3ce7d85a /tools/objtool/builtin-check.c | |
parent | 6545eb030e6f14cef8793a86312483c788eaee46 (diff) |
objtool: Move ORC logic out of check()
Now that the objtool_file can be obtained outside of the check function,
orc generation builtin no longer requires check to explicitly call its
orc related functions.
Signed-off-by: Julien Thierry <jthierry@redhat.com>
Reviewed-by: Miroslav Benes <mbenes@suse.cz>
Signed-off-by: Josh Poimboeuf <jpoimboe@redhat.com>
Diffstat (limited to 'tools/objtool/builtin-check.c')
-rw-r--r-- | tools/objtool/builtin-check.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/tools/objtool/builtin-check.c b/tools/objtool/builtin-check.c index 0126ec3bb6c9..c6d199bfd0ae 100644 --- a/tools/objtool/builtin-check.c +++ b/tools/objtool/builtin-check.c @@ -42,6 +42,7 @@ int cmd_check(int argc, const char **argv) { const char *objname, *s; struct objtool_file *file; + int ret; argc = parse_options(argc, argv, check_options, check_usage, 0); @@ -58,5 +59,12 @@ int cmd_check(int argc, const char **argv) if (!file) return 1; - return check(file, false); + ret = check(file); + if (ret) + return ret; + + if (file->elf->changed) + return elf_write(file->elf); + + return 0; } |