Commit d74fcd1e authored by Steven Rostedt's avatar Steven Rostedt Committed by Ingo Molnar

ftrace: update recordmount.pl arch changes

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.
Signed-off-by: default avatarSteven Rostedt <srostedt@redhat.com>
Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
parent 6a4917e3
...@@ -108,20 +108,6 @@ if ($#ARGV < 6) { ...@@ -108,20 +108,6 @@ if ($#ARGV < 6) {
my ($arch, $objdump, $objcopy, $cc, $ld, $nm, $rm, $mv, $inputfile) = @ARGV; 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); $objdump = "objdump" if ((length $objdump) == 0);
$objcopy = "objcopy" if ((length $objcopy) == 0); $objcopy = "objcopy" if ((length $objcopy) == 0);
$cc = "gcc" if ((length $cc) == 0); $cc = "gcc" if ((length $cc) == 0);
...@@ -146,11 +132,25 @@ if ($arch eq "x86_64") { ...@@ -146,11 +132,25 @@ if ($arch eq "x86_64") {
$function_regex = "<(.*?)>:"; $function_regex = "<(.*?)>:";
$mcount_regex = "^\\s*([0-9a-fA-F]+):.*\\smcount([+-]0x[0-9a-zA-Z]+)?\$"; $mcount_regex = "^\\s*([0-9a-fA-F]+):.*\\smcount([+-]0x[0-9a-zA-Z]+)?\$";
$type = ".quad"; $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") { } elsif ($arch eq "i386") {
$section_regex = "Disassembly of section"; $section_regex = "Disassembly of section";
$function_regex = "<(.*?)>:"; $function_regex = "<(.*?)>:";
$mcount_regex = "^\\s*([0-9a-fA-F]+):.*\\smcount\$"; $mcount_regex = "^\\s*([0-9a-fA-F]+):.*\\smcount\$";
$type = ".long"; $type = ".long";
# force flags for this arch
$ld .= " -m elf_i386";
$objdump .= " -M i386";
$objcopy .= " -O elf32-i386";
$cc .= " -m32";
} else { } else {
die "Arch $arch is not supported with CONFIG_FTRACE_MCOUNT_RECORD"; die "Arch $arch is not supported with CONFIG_FTRACE_MCOUNT_RECORD";
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment