[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.DEB.1.10.0808151136310.2188@gandalf.stny.rr.com>
Date: Fri, 15 Aug 2008 11:40:24 -0400 (EDT)
From: Steven Rostedt <rostedt@...dmis.org>
To: LKML <linux-kernel@...r.kernel.org>, Ingo Molnar <mingo@...e.hu>
cc: Andrew Morton <akpm@...ux-foundation.org>,
Thomas Gleixner <tglx@...utronix.de>,
Peter Zijlstra <peterz@...radead.org>
Subject: [PATCH] ftrace: update recordmount.pl arch changes
Ingo,
I'm trying to keep all the arch changes in recordmcount.pl in one place.
I moved your code into that area, by adding the flags to the commands
that were passed in.
Does this change still work for you when compiling i386 on a x86_64 box?
Signed-off-by: Steven Rostedt <srostedt@...hat.com>
Index: linux-tip.git/scripts/recordmcount.pl
===================================================================
--- linux-tip.git.orig/scripts/recordmcount.pl 2008-08-15 10:54:00.000000000 -0400
+++ linux-tip.git/scripts/recordmcount.pl 2008-08-15 10:59:10.000000000 -0400
@@ -108,20 +108,6 @@
my ($arch, $objdump, $objcopy, $cc, $ld, $nm, $rm, $mv, $inputfile) = @ARGV;
-if ($arch eq "i386") {
- $ld = "ld -m elf_i386";
- $objdump = "objdump -M i386";
- $objcopy = "objcopy -O elf32-i386";
- $cc = "gcc -m32";
-}
-
-if ($arch eq "x86_64") {
- $ld = "ld -m elf_x86_64";
- $objdump = "objdump -M x86-64";
- $objcopy = "objcopy -O elf64-x86-64";
- $cc = "gcc -m64";
-}
-
$objdump = "objdump" if ((length $objdump) == 0);
$objcopy = "objcopy" if ((length $objcopy) == 0);
$cc = "gcc" if ((length $cc) == 0);
@@ -146,11 +132,25 @@
$function_regex = "<(.*?)>:";
$mcount_regex = "^\\s*([0-9a-fA-F]+):.*\\smcount([+-]0x[0-9a-zA-Z]+)?\$";
$type = ".quad";
+
+ # force flags for this arch
+ $ld .= " -m elf_x86_64";
+ $objdump .= " -M x86-64";
+ $objcopy .= " -O elf64-x86-64";
+ $cc .= " -m64";
+
} elsif ($arch eq "i386") {
$section_regex = "Disassembly of section";
$function_regex = "<(.*?)>:";
$mcount_regex = "^\\s*([0-9a-fA-F]+):.*\\smcount\$";
$type = ".long";
+
+ # force flags for this arch
+ $ld .= " -m elf_i386";
+ $objdump .= " -M i386";
+ $objcopy .= " -O elf32-i386";
+ $cc .= " -m32";
+
} else {
die "Arch $arch is not supported with CONFIG_FTRACE_MCOUNT_RECORD";
}
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists