aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/tools/objtool/check.c
diff options
context:
space:
mode:
authorJosh Poimboeuf <jpoimboe@redhat.com>2022-04-18 09:50:38 -0700
committerPeter Zijlstra <peterz@infradead.org>2022-04-22 12:32:03 +0200
commit26e176896a5bb9222ae3433da902edd2566a61a4 (patch)
treece6ba0fdc6b1373f09692f2d151d3892125ffbb5 /tools/objtool/check.c
parentobjtool: Make stack validation frame-pointer-specific (diff)
downloadwireguard-linux-26e176896a5bb9222ae3433da902edd2566a61a4.tar.xz
wireguard-linux-26e176896a5bb9222ae3433da902edd2566a61a4.zip
objtool: Make static call annotation optional
As part of making objtool more modular, put the existing static call code behind a new '--static-call' option. Signed-off-by: Josh Poimboeuf <jpoimboe@redhat.com> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Reviewed-by: Miroslav Benes <mbenes@suse.cz> Link: https://lkml.kernel.org/r/d59ac57ef3d6d8380cdce20322314c9e2e556750.1650300597.git.jpoimboe@redhat.com
Diffstat (limited to 'tools/objtool/check.c')
-rw-r--r--tools/objtool/check.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/tools/objtool/check.c b/tools/objtool/check.c
index 3e02126738a1..b9ac351ea08b 100644
--- a/tools/objtool/check.c
+++ b/tools/objtool/check.c
@@ -3969,10 +3969,12 @@ int check(struct objtool_file *file)
warnings += ret;
}
- ret = create_static_call_sections(file);
- if (ret < 0)
- goto out;
- warnings += ret;
+ if (opts.static_call) {
+ ret = create_static_call_sections(file);
+ if (ret < 0)
+ goto out;
+ warnings += ret;
+ }
if (opts.retpoline) {
ret = create_retpoline_sites_sections(file);