xref: /linux/tools/objtool/include/objtool/builtin.h (revision 63e6995005be8ceb8a1d56a18df1a1a40c28356d)
1 /* SPDX-License-Identifier: GPL-2.0-or-later */
2 /*
3  * Copyright (C) 2015 Josh Poimboeuf <jpoimboe@redhat.com>
4  */
5 #ifndef _BUILTIN_H
6 #define _BUILTIN_H
7 
8 #include <subcmd/parse-options.h>
9 
10 struct opts {
11 	/* actions: */
12 	bool cfi;
13 	bool checksum;
14 	bool dump_orc;
15 	bool hack_jump_label;
16 	bool hack_noinstr;
17 	bool hack_skylake;
18 	bool ibt;
19 	bool mcount;
20 	bool noabs;
21 	bool noinstr;
22 	bool orc;
23 	bool retpoline;
24 	bool rethunk;
25 	bool unret;
26 	bool sls;
27 	bool stackval;
28 	bool static_call;
29 	bool uaccess;
30 	int prefix;
31 	const char *disas;
32 
33 	/* options: */
34 	bool backtrace;
35 	bool backup;
36 	const char *debug_checksum;
37 	bool dryrun;
38 	bool link;
39 	bool mnop;
40 	bool module;
41 	bool no_unreachable;
42 	const char *output;
43 	bool sec_address;
44 	bool stats;
45 	const char *trace;
46 	bool verbose;
47 	bool werror;
48 	bool wide;
49 };
50 
51 extern struct opts opts;
52 
53 int cmd_parse_options(int argc, const char **argv, const char * const usage[]);
54 
55 int objtool_run(int argc, const char **argv);
56 
57 int make_backup(void);
58 
59 int cmd_klp(int argc, const char **argv);
60 
61 #endif /* _BUILTIN_H */
62