Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 121078
b: refs/heads/master
c: 7d5222a
h: refs/heads/master
v: v3
  • Loading branch information
Matt Fleming authored and Ingo Molnar committed Nov 8, 2008
1 parent 595a3a8 commit c944c4e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: c76f06945be50564f925799ddfb6235ee4c26aa0
refs/heads/master: 7d5222a6afa4e429f55df8c086adb747837cbdf5
4 changes: 4 additions & 0 deletions trunk/scripts/recordmcount.pl
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,7 @@
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)
my $alignment; # The .align value to use for $mcount_section

if ($arch eq "x86") {
if ($bits == 64) {
Expand All @@ -148,6 +149,7 @@
$function_regex = "^([0-9a-fA-F]+)\\s+<(.*?)>:";
$mcount_regex = "^\\s*([0-9a-fA-F]+):.*\\smcount([+-]0x[0-9a-zA-Z]+)?\$";
$type = ".quad";
$alignment = 8;

# force flags for this arch
$ld .= " -m elf_x86_64";
Expand All @@ -160,6 +162,7 @@
$function_regex = "^([0-9a-fA-F]+)\\s+<(.*?)>:";
$mcount_regex = "^\\s*([0-9a-fA-F]+):.*\\smcount\$";
$type = ".long";
$alignment = 4;

# force flags for this arch
$ld .= " -m elf_i386";
Expand Down Expand Up @@ -288,6 +291,7 @@ sub update_funcs
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.align $alignment\n";
}
printf FILE "\t%s %s + %d\n", $type, $ref_func, $offsets[$i] - $offset;
}
Expand Down

0 comments on commit c944c4e

Please sign in to comment.