summaryrefslogtreecommitdiff
path: root/arch/powerpc
diff options
context:
space:
mode:
Diffstat (limited to 'arch/powerpc')
-rwxr-xr-xarch/powerpc/tools/ftrace-gen-ool-stubs.sh7
1 files changed, 4 insertions, 3 deletions
diff --git a/arch/powerpc/tools/ftrace-gen-ool-stubs.sh b/arch/powerpc/tools/ftrace-gen-ool-stubs.sh
index 950a7778324b..bac186bdf64a 100755
--- a/arch/powerpc/tools/ftrace-gen-ool-stubs.sh
+++ b/arch/powerpc/tools/ftrace-gen-ool-stubs.sh
@@ -15,10 +15,11 @@ if [ -z "$is_64bit" ]; then
RELOCATION=R_PPC_ADDR32
fi
-num_ool_stubs_text=$($objdump -r -j __patchable_function_entries "$vmlinux_o" |
- grep -v ".init.text" | grep -c "$RELOCATION")
+num_ool_stubs_total=$($objdump -r -j __patchable_function_entries "$vmlinux_o" |
+ grep -c "$RELOCATION")
num_ool_stubs_inittext=$($objdump -r -j __patchable_function_entries "$vmlinux_o" |
- grep ".init.text" | grep -c "$RELOCATION")
+ grep -e ".init.text" -e ".text.startup" | grep -c "$RELOCATION")
+num_ool_stubs_text=$((num_ool_stubs_total - num_ool_stubs_inittext))
if [ "$num_ool_stubs_text" -gt "$num_ool_stubs_text_builtin" ]; then
num_ool_stubs_text_end=$((num_ool_stubs_text - num_ool_stubs_text_builtin))