diff --git a/patches.suse/ftrace-recordmcount-binutils.patch b/patches.suse/ftrace-recordmcount-binutils.patch new file mode 100644 index 0000000..c5befe8 --- /dev/null +++ b/patches.suse/ftrace-recordmcount-binutils.patch @@ -0,0 +1,29 @@ +From: Miroslav Benes +Subject: ftrace: Fix scripts/recordmcount.pl due to new binutils +Patch-mainline: Not yet, will be submitted upstream eventually +References: bsc#1192267 + +Binutils update containing commit +b10b530a4566888492ac693773e1e35f66c4b7c4 changed how certain +instructions are translated by objdump. It broke ftrace on s390x in a +way that mcount locations are not recorded anymore. brcl insn became +jgnop. + +Fix scripts/recordmcount.pl so that it can recognize both options. + +Signed-off-by: Miroslav Benes +--- + scripts/recordmcount.pl | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/scripts/recordmcount.pl ++++ b/scripts/recordmcount.pl +@@ -246,7 +246,7 @@ if ($arch eq "x86_64") { + + } elsif ($arch eq "s390" && $bits == 64) { + if ($cc =~ /-DCC_USING_HOTPATCH/) { +- $mcount_regex = "^\\s*([0-9a-fA-F]+):\\s*c0 04 00 00 00 00\\s*brcl\\s*0,[0-9a-f]+ <([^\+]*)>\$"; ++ $mcount_regex = "^\\s*([0-9a-fA-F]+):\\s*c0 04 00 00 00 00\\s*(brcl\\s*0,|jgnop\\s*)[0-9a-f]+ <([^\+]*)>\$"; + $mcount_adjust = 0; + } else { + $mcount_regex = "^\\s*([0-9a-fA-F]+):\\s*R_390_(PC|PLT)32DBL\\s+_mcount\\+0x2\$"; diff --git a/series.conf b/series.conf index 20994dd..4a912ef 100644 --- a/series.conf +++ b/series.conf @@ -52469,6 +52469,7 @@ # Tracing patches.suse/0003-Add-external-no-support-as-bad-taint-module.patch + patches.suse/ftrace-recordmcount-binutils.patch ######################################################## # Livepatching