Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 257052
b: refs/heads/master
c: 414eb44
h: refs/heads/master
v: v3
  • Loading branch information
Martin Schwidefsky authored and Steven Rostedt committed May 17, 2011
1 parent ad837eb commit 0ceb80c
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: f215efc50a3c1430735e89915fae188f927d8773
refs/heads/master: 414eb44dda6b9893b212b2306ccb423ab01eef8e
7 changes: 3 additions & 4 deletions trunk/arch/x86/include/asm/ftrace.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,10 @@ extern void mcount(void);
static inline unsigned long ftrace_call_adjust(unsigned long addr)
{
/*
* call mcount is "e8 <4 byte offset>"
* The addr points to the 4 byte offset and the caller of this
* function wants the pointer to e8. Simply subtract one.
* addr is the address of the mcount call instruction.
* recordmcount does the necessary offset calculation.
*/
return addr - 1;
return addr;
}

#ifdef CONFIG_DYNAMIC_FTRACE
Expand Down
2 changes: 2 additions & 0 deletions trunk/scripts/recordmcount.c
Original file line number Diff line number Diff line change
Expand Up @@ -335,6 +335,7 @@ do_file(char const *const fname)
reltype = R_386_32;
make_nop = make_nop_x86;
ideal_nop = ideal_nop5_x86_32;
mcount_adjust_32 = -1;
break;
case EM_ARM: reltype = R_ARM_ABS32;
altmcount = "__gnu_mcount_nc";
Expand All @@ -350,6 +351,7 @@ do_file(char const *const fname)
make_nop = make_nop_x86;
ideal_nop = ideal_nop5_x86_64;
reltype = R_X86_64_64;
mcount_adjust_64 = -1;
break;
} /* end switch */

Expand Down
2 changes: 2 additions & 0 deletions trunk/scripts/recordmcount.pl
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,7 @@ sub check_objcopy
$mcount_regex = "^\\s*([0-9a-fA-F]+):.*\\smcount([+-]0x[0-9a-zA-Z]+)?\$";
$type = ".quad";
$alignment = 8;
$mcount_adjust = -1;

# force flags for this arch
$ld .= " -m elf_x86_64";
Expand All @@ -232,6 +233,7 @@ sub check_objcopy

} elsif ($arch eq "i386") {
$alignment = 4;
$mcount_adjust = -1;

# force flags for this arch
$ld .= " -m elf_i386";
Expand Down

0 comments on commit 0ceb80c

Please sign in to comment.