summaryrefslogtreecommitdiffstats
path: root/scripts/recordmcount.h
diff options
context:
space:
mode:
authorRabin Vincent <rabin@rab.in>2010-11-30 17:36:48 +0100
committerRussell King <rmk+kernel@arm.linux.org.uk>2010-12-04 12:30:27 +0100
commited60453fa8f8fc3d034dfdf10371a99cc6905626 (patch)
tree54a67cc7e01481c7b11b5c077a784149b8ad7979 /scripts/recordmcount.h
parentARM: 6509/1: ftrace: ignore any ftrace.o in C version of recordmcount (diff)
downloadlinux-ed60453fa8f8fc3d034dfdf10371a99cc6905626.tar.xz
linux-ed60453fa8f8fc3d034dfdf10371a99cc6905626.zip
ARM: 6511/1: ftrace: add ARM support for C version of recordmcount
Depending on the compiler version, ARM GCC calls the mcount function either __gnu_mcount_nc or mcount. Acked-by: Steven Rostedt <rostedt@goodmis.org> Signed-off-by: Rabin Vincent <rabin@rab.in> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'scripts/recordmcount.h')
-rw-r--r--scripts/recordmcount.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/scripts/recordmcount.h b/scripts/recordmcount.h
index 58e933a20544..8087bc8cd2d1 100644
--- a/scripts/recordmcount.h
+++ b/scripts/recordmcount.h
@@ -275,11 +275,12 @@ static uint_t *sift_rel_mcount(uint_t *mlocp,
Elf_Sym const *const symp =
&sym0[Elf_r_sym(relp)];
char const *symname = &str0[w(symp->st_name)];
+ char const *mcount = '_' == gpfx ? "_mcount" : "mcount";
if ('.' == symname[0])
++symname; /* ppc64 hack */
- if (0 == strcmp((('_' == gpfx) ? "_mcount" : "mcount"),
- symname))
+ if (0 == strcmp(mcount, symname) ||
+ (altmcount && 0 == strcmp(altmcount, symname)))
mcountsym = Elf_r_sym(relp);
}