Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

kbuild: dummy-tools: pretend we understand -fpatchable-function-entry

Commit 0f71dcfb4aef ("powerpc/ftrace: Add support for
-fpatchable-function-entry") added a script to check for
-fpatchable-function-entry compiler support. The script expects compiler
to emit the section __patchable_function_entries and few nops after a
function entry.

If the compiler understands and emits the above,
CONFIG_ARCH_USING_PATCHABLE_FUNCTION_ENTRY is set.

So teach dummy-tools' gcc about this.

Signed-off-by: Jiri Slaby (SUSE) <jirislaby@kernel.org>
Reviewed-by: Nathan Chancellor <nathan@kernel.org>
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>

authored by

Jiri Slaby (SUSE) and committed by
Masahiro Yamada
1bfaa37f 766b7007

+10
+10
scripts/dummy-tools/gcc
··· 91 91 fi 92 92 exit 0 93 93 fi 94 + 95 + # For arch/powerpc/tools/gcc-check-fpatchable-function-entry.sh 96 + if arg_contain -m64 "$@" && arg_contain -fpatchable-function-entry=2 "$@"; then 97 + echo "func:" 98 + echo ".section __patchable_function_entries" 99 + echo ".localentry" 100 + echo " nop" 101 + echo " nop" 102 + exit 0 103 + fi 94 104 fi 95 105 96 106 # To set GCC_PLUGINS