summaryrefslogtreecommitdiff
path: root/tools/objtool/check.c
diff options
context:
space:
mode:
authorJosh Poimboeuf <jpoimboe@kernel.org>2025-09-17 19:03:43 +0300
committerJosh Poimboeuf <jpoimboe@kernel.org>2025-10-15 00:46:48 +0300
commit2b91479776b66cd815e339d420abbf4ae047bfb2 (patch)
tree4bb097ce69e99f7ca4f7fd3340205f24fbe22a52 /tools/objtool/check.c
parent56754f0f46f6a36ba66e8c1b2878f7a4f1edfe3b (diff)
downloadlinux-2b91479776b66cd815e339d420abbf4ae047bfb2.tar.xz
objtool: Resurrect --backup option
The --backup option was removed with the following commit: aa8b3e64fd39 ("objtool: Create backup on error and print args") ... which tied the backup functionality to --verbose, and only for warnings/errors. It's a bit inelegant and out of scope to tie that to --verbose. Bring back the old --backup option, but with the new behavior: only on warnings/errors, and print the args to make it easier to recreate. Suggested-by: Peter Zijlstra <peterz@infradead.org> Acked-by: Petr Mladek <pmladek@suse.com> Tested-by: Joe Lawrence <joe.lawrence@redhat.com> Signed-off-by: Josh Poimboeuf <jpoimboe@kernel.org>
Diffstat (limited to 'tools/objtool/check.c')
-rw-r--r--tools/objtool/check.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/tools/objtool/check.c b/tools/objtool/check.c
index e567a625b9e0..b63f7c4182ef 100644
--- a/tools/objtool/check.c
+++ b/tools/objtool/check.c
@@ -4824,9 +4824,11 @@ out:
if (opts.verbose) {
if (opts.werror && warnings)
WARN("%d warning(s) upgraded to errors", warnings);
- print_args();
disas_warned_funcs(file);
}
+ if (opts.backup && make_backup())
+ return 1;
+
return ret;
}