summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorMatt Fleming <mjf@gentoo.org>2008-11-12 20:11:47 +0900
committerPaul Mundt <lethal@linux-sh.org>2008-11-12 20:11:47 +0900
commit11ebca4a3f8337de2f4d1300bd307851d1191d53 (patch)
tree3ee540fbd91f200f021f98ea538dda7e39428bb0 /scripts
parente637f3e56309b92662d09393ea76d5c80a1c47d5 (diff)
sh: dynamic ftrace support.
First cut at dynamic ftrace support. Signed-off-by: Matt Fleming <mjf@gentoo.org> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/recordmcount.pl11
1 files changed, 11 insertions, 0 deletions
diff --git a/scripts/recordmcount.pl b/scripts/recordmcount.pl
index 6b9fe3eb8360..c67cec8e90f4 100755
--- a/scripts/recordmcount.pl
+++ b/scripts/recordmcount.pl
@@ -167,6 +167,17 @@ if ($arch eq "x86_64") {
$objcopy .= " -O elf32-i386";
$cc .= " -m32";
+} elsif ($arch eq "sh") {
+ $section_regex = "Disassembly of section\\s+(\\S+):";
+ $function_regex = "^([0-9a-fA-F]+)\\s+<(.*?)>:";
+ $mcount_regex = "^\\s*([0-9a-fA-F]+):.*\\smcount\$";
+ $type = ".long";
+
+ # force flags for this arch
+ $ld .= " -m shlelf_linux";
+ $objcopy .= " -O elf32-sh-linux";
+ $cc .= " -m32";
+
} else {
die "Arch $arch is not supported with CONFIG_FTRACE_MCOUNT_RECORD";
}