summaryrefslogtreecommitdiffstats
path: root/tools/objtool/check.c
diff options
context:
space:
mode:
authorJosh Poimboeuf <jpoimboe@redhat.com>2022-04-18 18:50:27 +0200
committerPeter Zijlstra <peterz@infradead.org>2022-04-22 12:32:01 +0200
commitb51277eb9775ce916f9efd2c51533e481180c1e8 (patch)
tree41284a6b5ef00419d8ac09f8820636d67aa05131 /tools/objtool/check.c
parentobjtool: Reorganize cmdline options (diff)
downloadlinux-b51277eb9775ce916f9efd2c51533e481180c1e8.tar.xz
linux-b51277eb9775ce916f9efd2c51533e481180c1e8.zip
objtool: Ditch subcommands
Objtool has a fairly singular focus. It runs on object files and does validations and transformations which can be combined in various ways. The subcommand model has never been a good fit, making it awkward to combine and remove options. Remove the "check" and "orc" subcommands in favor of a more traditional cmdline option model. This makes it much more flexible to use, and easier to port individual features to other arches. Signed-off-by: Josh Poimboeuf <jpoimboe@redhat.com> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Reviewed-by: Miroslav Benes <mbenes@suse.cz> Link: https://lkml.kernel.org/r/5c61ebf805e90aefc5fa62bc63468ffae53b9df6.1650300597.git.jpoimboe@redhat.com
Diffstat (limited to 'tools/objtool/check.c')
-rw-r--r--tools/objtool/check.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/tools/objtool/check.c b/tools/objtool/check.c
index 3362cc3bdf1a..16a6c4b4f6bb 100644
--- a/tools/objtool/check.c
+++ b/tools/objtool/check.c
@@ -3949,6 +3949,14 @@ int check(struct objtool_file *file)
warnings += ret;
}
+ if (opts.orc && !list_empty(&file->insn_list)) {
+ ret = orc_create(file);
+ if (ret < 0)
+ goto out;
+ warnings += ret;
+ }
+
+
if (opts.stats) {
printf("nr_insns_visited: %ld\n", nr_insns_visited);
printf("nr_cfi: %ld\n", nr_cfi);