]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - scripts/recordmcount.pl
ftrace: handle generic arch calls
[linux-2.6-omap-h63xx.git] / scripts / recordmcount.pl
index f56d760bd589d47ff8e59762eac2ae36424e35aa..c1c618cd96f6d13c93f3973e4d3c408e9505d82e 100755 (executable)
@@ -106,7 +106,8 @@ if ($#ARGV < 6) {
        exit(1);
 }
 
-my ($arch, $objdump, $objcopy, $cc, $ld, $nm, $rm, $mv, $inputfile) = @ARGV;
+my ($arch, $bits, $objdump, $objcopy, $cc,
+    $ld, $nm, $rm, $mv, $inputfile) = @ARGV;
 
 $objdump = "objdump" if ((length $objdump) == 0);
 $objcopy = "objcopy" if ((length $objcopy) == 0);
@@ -129,6 +130,14 @@ my $function_regex;        # Find the name of a function
                        #    (return offset and func name)
 my $mcount_regex;      # Find the call site to mcount (return offset)
 
+if ($arch eq "x86") {
+    if ($bits == 64) {
+       $arch = "x86_64";
+    } else {
+       $arch = "i386";
+    }
+}
+
 if ($arch eq "x86_64") {
     $section_regex = "Disassembly of section";
     $function_regex = "^([0-9a-fA-F]+)\\s+<(.*?)>:";