diff options
author | Josh Poimboeuf <jpoimboe@redhat.com> | 2022-04-18 18:50:26 +0200 |
---|---|---|
committer | Peter Zijlstra <peterz@infradead.org> | 2022-04-22 12:32:01 +0200 |
commit | 2daf7faba7ded8703e4b4ebc8b161f22272fc91a (patch) | |
tree | ef4b773a890fb3c3a31f2cf2f2849388da9481dd /tools/objtool/objtool.c | |
parent | libsubcmd: Fix OPTION_GROUP sorting (diff) | |
download | linux-2daf7faba7ded8703e4b4ebc8b161f22272fc91a.tar.xz linux-2daf7faba7ded8703e4b4ebc8b161f22272fc91a.zip |
objtool: Reorganize cmdline options
Split the existing options into two groups: actions, which actually do
something; and options, which modify the actions in some way.
Also there's no need to have short flags for all the non-action options.
Reserve short flags for the more important actions.
While at it:
- change a few of the short flags to be more intuitive
- make option descriptions more consistently descriptive
- sort options in the source like they are when printed
- move options to a global struct
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/9dcaa752f83aca24b1b21f0b0eeb28a0c181c0b0.1650300597.git.jpoimboe@redhat.com
Diffstat (limited to '')
-rw-r--r-- | tools/objtool/objtool.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tools/objtool/objtool.c b/tools/objtool/objtool.c index 843ff3c2f28e..a0f3d3c9558d 100644 --- a/tools/objtool/objtool.c +++ b/tools/objtool/objtool.c @@ -118,7 +118,7 @@ struct objtool_file *objtool_open_read(const char *_objname) if (!file.elf) return NULL; - if (backup && !objtool_create_backup(objname)) { + if (opts.backup && !objtool_create_backup(objname)) { WARN("can't create backup file"); return NULL; } @@ -129,7 +129,7 @@ struct objtool_file *objtool_open_read(const char *_objname) INIT_LIST_HEAD(&file.static_call_list); INIT_LIST_HEAD(&file.mcount_loc_list); INIT_LIST_HEAD(&file.endbr_list); - file.ignore_unreachables = no_unreachable; + file.ignore_unreachables = opts.no_unreachable; file.hints = false; return &file; @@ -137,7 +137,7 @@ struct objtool_file *objtool_open_read(const char *_objname) void objtool_pv_add(struct objtool_file *f, int idx, struct symbol *func) { - if (!noinstr) + if (!opts.noinstr) return; if (!f->pv_ops) { |