diff options
author | Martin Schwidefsky <schwidefsky@de.ibm.com> | 2011-05-10 10:10:43 +0200 |
---|---|---|
committer | Steven Rostedt <rostedt@goodmis.org> | 2011-05-17 10:42:12 -0400 |
commit | 0ef5bf1cd3bd2e3eacb11fca80efe3674927ed1a (patch) | |
tree | 85e5db146f6a1d32988b3efb4fae60fa00a2dcbe /scripts/recordmcount.c | |
parent | 414eb44dda6b9893b212b2306ccb423ab01eef8e (diff) | |
download | linux-0ef5bf1cd3bd2e3eacb11fca80efe3674927ed1a.tar.bz2 |
ftrace/s390: mcount offset calculation
Do the mcount offset adjustment in the recordmcount.pl/recordmcount.[ch]
at compile time and not in ftrace_call_adjust at run time.
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Diffstat (limited to 'scripts/recordmcount.c')
-rw-r--r-- | scripts/recordmcount.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/scripts/recordmcount.c b/scripts/recordmcount.c index 7648a5d11154..ee52cb8e17ad 100644 --- a/scripts/recordmcount.c +++ b/scripts/recordmcount.c @@ -368,8 +368,10 @@ do_file(char const *const fname) "unrecognized ET_REL file: %s\n", fname); fail_file(); } - if (w2(ehdr->e_machine) == EM_S390) + if (w2(ehdr->e_machine) == EM_S390) { reltype = R_390_32; + mcount_adjust_32 = -4; + } if (w2(ehdr->e_machine) == EM_MIPS) { reltype = R_MIPS_32; is_fake_mcount32 = MIPS32_is_fake_mcount; @@ -384,8 +386,10 @@ do_file(char const *const fname) "unrecognized ET_REL file: %s\n", fname); fail_file(); } - if (w2(ghdr->e_machine) == EM_S390) + if (w2(ghdr->e_machine) == EM_S390) { reltype = R_390_64; + mcount_adjust_64 = -8; + } if (w2(ghdr->e_machine) == EM_MIPS) { reltype = R_MIPS_64; Elf64_r_sym = MIPS64_r_sym; |