summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorMartin Schwidefsky <schwidefsky@de.ibm.com>2011-05-10 10:10:43 +0200
committerSteven Rostedt <rostedt@goodmis.org>2011-05-16 15:05:06 -0400
commitf29638868280534ed7e2fdd93b31557232597940 (patch)
treedf11bf6f18442c29b5c76566560e8874c040d9d4 /scripts
parent521ccb5c4aece609311bfa7157910a8f0c942af5 (diff)
downloadblackbird-op-linux-f29638868280534ed7e2fdd93b31557232597940.tar.gz
blackbird-op-linux-f29638868280534ed7e2fdd93b31557232597940.zip
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')
-rw-r--r--scripts/recordmcount.c8
-rwxr-xr-xscripts/recordmcount.pl2
2 files changed, 8 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;
diff --git a/scripts/recordmcount.pl b/scripts/recordmcount.pl
index 414e7f5e42ec..858966ab019c 100755
--- a/scripts/recordmcount.pl
+++ b/scripts/recordmcount.pl
@@ -243,12 +243,14 @@ if ($arch eq "x86_64") {
} elsif ($arch eq "s390" && $bits == 32) {
$mcount_regex = "^\\s*([0-9a-fA-F]+):\\s*R_390_32\\s+_mcount\$";
+ $mcount_adjust = -4;
$alignment = 4;
$ld .= " -m elf_s390";
$cc .= " -m31";
} elsif ($arch eq "s390" && $bits == 64) {
$mcount_regex = "^\\s*([0-9a-fA-F]+):\\s*R_390_(PC|PLT)32DBL\\s+_mcount\\+0x2\$";
+ $mcount_adjust = -8;
$alignment = 8;
$type = ".quad";
$ld .= " -m elf64_s390";
OpenPOWER on IntegriCloud