From 5f401bb37aed76eff62dd53647b7d55341bf983a Mon Sep 17 00:00:00 2001 From: Jim Radford Date: Thu, 20 Nov 2008 19:48:39 -0800 Subject: [PATCH] --- yaml --- r: 121171 b: refs/heads/master c: e58918ab9d4cd375f6d842e6d88cf4d7a55cbfcc h: refs/heads/master i: 121169: a33f13472f6288c4e3d6099cbe0e30f185bbcf8f 121167: 0a4de6c5c9c9f3a5ef7c4306a682378a75437fc5 v: v3 --- [refs] | 2 +- trunk/scripts/recordmcount.pl | 8 +++++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/[refs] b/[refs] index 9f6a0093501d..e49655d3a18c 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 3a3d04aed05add2247ea2ba5da5f90dba4062f3f +refs/heads/master: e58918ab9d4cd375f6d842e6d88cf4d7a55cbfcc diff --git a/trunk/scripts/recordmcount.pl b/trunk/scripts/recordmcount.pl index 03b6af1388ea..0197e2f6b544 100755 --- a/trunk/scripts/recordmcount.pl +++ b/trunk/scripts/recordmcount.pl @@ -136,6 +136,7 @@ # (return offset and func name) my $mcount_regex; # Find the call site to mcount (return offset) my $alignment; # The .align value to use for $mcount_section +my $section_type; # Section header plus possible alignment command if ($arch eq "x86") { if ($bits == 64) { @@ -153,6 +154,7 @@ $section_regex = "Disassembly of section\\s+(\\S+):"; $function_regex = "^([0-9a-fA-F]+)\\s+<(.*?)>:"; $mcount_regex = "^\\s*([0-9a-fA-F]+):.*\\smcount\$"; +$section_type = '@progbits'; $type = ".long"; if ($arch eq "x86_64") { @@ -192,6 +194,10 @@ $type = ".quad"; } +} elsif ($arch eq "arm") { + $alignment = 2; + $section_type = '%progbits'; + } else { die "Arch $arch is not supported with CONFIG_FTRACE_MCOUNT_RECORD"; } @@ -312,7 +318,7 @@ sub update_funcs if (!$opened) { open(FILE, ">$mcount_s") || die "can't create $mcount_s\n"; $opened = 1; - print FILE "\t.section $mcount_section,\"a\",\@progbits\n"; + print FILE "\t.section $mcount_section,\"a\",$section_type\n"; print FILE "\t.align $alignment\n" if (defined($alignment)); } printf FILE "\t%s %s + %d\n", $type, $ref_func, $offsets[$i] - $offset;