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
88 #include <subcmd/parse-options.h>
99
1010 extern const struct option check_options[];
11−extern bool no_fp, no_unreachable, retpoline, module, backtrace, uaccess, stats,
12− lto, vmlinux, mcount, noinstr, backup, sls, dryrun,
13− ibt;
11+
12+struct opts {
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+
33+extern struct opts opts;
1434
1535 extern int cmd_parse_options(int argc, const char **argv, const char * const usage[]);
1636

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