summaryrefslogtreecommitdiffstats
path: root/tools/objtool/check.c
diff options
context:
space:
mode:
authorPeter Zijlstra <peterz@infradead.org>2022-03-08 16:30:45 +0100
committerPeter Zijlstra <peterz@infradead.org>2022-03-15 10:32:42 +0100
commit53f7109ef957315ab53205ba3a3f4f48874c0428 (patch)
treeb8bea43867db32c24fd349b9f4c38f93fc025caf /tools/objtool/check.c
parentcb9010f87dcbcdbb51cc96b922c6260848cecbd1 (diff)
downloadlinux-53f7109ef957315ab53205ba3a3f4f48874c0428.tar.bz2
objtool: Rename --duplicate to --lto
In order to prepare for LTO like objtool runs for modules, rename the duplicate argument to lto. Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Acked-by: Josh Poimboeuf <jpoimboe@redhat.com> Link: https://lore.kernel.org/r/20220308154319.172584233@infradead.org
Diffstat (limited to 'tools/objtool/check.c')
-rw-r--r--tools/objtool/check.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/tools/objtool/check.c b/tools/objtool/check.c
index 311bfc6922c1..ae1d4f996803 100644
--- a/tools/objtool/check.c
+++ b/tools/objtool/check.c
@@ -3499,6 +3499,11 @@ int check(struct objtool_file *file)
{
int ret, warnings = 0;
+ if (lto && !(vmlinux || module)) {
+ fprintf(stderr, "--lto requires: --vmlinux or --module\n");
+ return 1;
+ }
+
arch_initial_func_cfi_state(&initial_func_cfi);
init_cfi_state(&init_cfi);
init_cfi_state(&func_cfi);
@@ -3519,7 +3524,7 @@ int check(struct objtool_file *file)
if (list_empty(&file->insn_list))
goto out;
- if (vmlinux && !validate_dup) {
+ if (vmlinux && !lto) {
ret = validate_vmlinux_functions(file);
if (ret < 0)
goto out;