History

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

Josh Poimboeuf committed 4 years ago

Commit 2daf7fa1 parent aa3d60e9 files · +108 −78Browse files

Showing the changes to tools/objtool/include/objtool (1 of 9 files). Show all

Unified · Split

tools/objtool/include/objtool/builtin.h+23−3
@@ -8,9 +8,29 @@ · 7 unmodified lines
8#include <subcmd/parse-options.h>8#include <subcmd/parse-options.h>
9 9
10extern const struct option check_options[];10extern const struct option check_options[];
11extern bool no_fp, no_unreachable, retpoline, module, backtrace, uaccess, stats,11
12 lto, vmlinux, mcount, noinstr, backup, sls, dryrun,12struct opts {
13 ibt;13 /* actions: */
14 bool ibt;
15 bool mcount;
16 bool noinstr;
17 bool retpoline;
18 bool sls;
19 bool uaccess;
20
21 /* options: */
22 bool backtrace;
23 bool backup;
24 bool dryrun;
25 bool lto;
26 bool module;
27 bool no_fp;
28 bool no_unreachable;
29 bool stats;
30 bool vmlinux;
31};
32
33extern struct opts opts;
14 34
15extern int cmd_parse_options(int argc, const char **argv, const char * const usage[]);35extern int cmd_parse_options(int argc, const char **argv, const char * const usage[]);
16 36

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t