diff options
author | Josh Poimboeuf <jpoimboe@kernel.org> | 2023-04-18 14:27:48 -0700 |
---|---|---|
committer | Josh Poimboeuf <jpoimboe@kernel.org> | 2023-05-16 06:31:51 -0700 |
commit | ca653464dd097fe64e69f1735e9f348b2a0f8037 (patch) | |
tree | 0d1f42b5efb9e2f46957e590f79b2062cdb5619e /tools/objtool/builtin-check.c | |
parent | 5e3992fe72748ed3892be876f09d4d990548b7af (diff) |
objtool: Add verbose option for disassembling affected functions
When a warning is associated with a function, add an option to
disassemble that function.
This makes it easier for reporters to submit the information needed to
diagnose objtool warnings.
Reviewed-by: Miroslav Benes <mbenes@suse.cz>
Link: https://lore.kernel.org/r/dd0fe13428ede186f09c74059a8001f4adcea5fc.1681853186.git.jpoimboe@kernel.org
Signed-off-by: Josh Poimboeuf <jpoimboe@kernel.org>
Diffstat (limited to 'tools/objtool/builtin-check.c')
-rw-r--r-- | tools/objtool/builtin-check.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/tools/objtool/builtin-check.c b/tools/objtool/builtin-check.c index 7c175198d09f..5e21cfb7661d 100644 --- a/tools/objtool/builtin-check.c +++ b/tools/objtool/builtin-check.c @@ -93,6 +93,7 @@ static const struct option check_options[] = { OPT_BOOLEAN(0, "no-unreachable", &opts.no_unreachable, "skip 'unreachable instruction' warnings"), OPT_BOOLEAN(0, "sec-address", &opts.sec_address, "print section addresses in warnings"), OPT_BOOLEAN(0, "stats", &opts.stats, "print statistics"), + OPT_BOOLEAN('v', "verbose", &opts.verbose, "verbose warnings"), OPT_END(), }; @@ -118,6 +119,10 @@ int cmd_parse_options(int argc, const char **argv, const char * const usage[]) parse_options(envc, envv, check_options, env_usage, 0); } + env = getenv("OBJTOOL_VERBOSE"); + if (env && !strcmp(env, "1")) + opts.verbose = true; + argc = parse_options(argc, argv, check_options, usage, 0); if (argc != 1) usage_with_options(usage, check_options); |