summaryrefslogtreecommitdiff
path: root/scripts/link-vmlinux.sh
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 /scripts/link-vmlinux.sh
parent72064474964724c59ddff58a581a31b1ede75cf9 (diff)
downloadlwn-26e176896a5bb9222ae3433da902edd2566a61a4.tar.gz
lwn-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 'scripts/link-vmlinux.sh')
-rwxr-xr-xscripts/link-vmlinux.sh5
1 files changed, 4 insertions, 1 deletions
diff --git a/scripts/link-vmlinux.sh b/scripts/link-vmlinux.sh
index 1be01163a9c5..33f14fe1ddde 100755
--- a/scripts/link-vmlinux.sh
+++ b/scripts/link-vmlinux.sh
@@ -141,11 +141,14 @@ objtool_link()
objtoolopt="${objtoolopt} --stackval"
fi
+ if is_enabled CONFIG_HAVE_STATIC_CALL_INLINE; then
+ objtoolopt="${objtoolopt} --static-call"
+ fi
+
if is_enabled CONFIG_X86_SMAP; then
objtoolopt="${objtoolopt} --uaccess"
fi
-
objtoolopt="${objtoolopt} --lto"
fi