diff options
author | Rabin Vincent <rabin@rab.in> | 2010-11-30 11:36:48 -0500 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2010-12-04 06:30:27 -0500 |
commit | ed60453fa8f8fc3d034dfdf10371a99cc6905626 (patch) | |
tree | 54a67cc7e01481c7b11b5c077a784149b8ad7979 /scripts/recordmcount.h | |
parent | cd3478f2bd8f2cec19f9247a8a9cd711cbe37683 (diff) |
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.h | 5 |
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, | |||
275 | Elf_Sym const *const symp = | 275 | Elf_Sym const *const symp = |
276 | &sym0[Elf_r_sym(relp)]; | 276 | &sym0[Elf_r_sym(relp)]; |
277 | char const *symname = &str0[w(symp->st_name)]; | 277 | char const *symname = &str0[w(symp->st_name)]; |
278 | char const *mcount = '_' == gpfx ? "_mcount" : "mcount"; | ||
278 | 279 | ||
279 | if ('.' == symname[0]) | 280 | if ('.' == symname[0]) |
280 | ++symname; /* ppc64 hack */ | 281 | ++symname; /* ppc64 hack */ |
281 | if (0 == strcmp((('_' == gpfx) ? "_mcount" : "mcount"), | 282 | if (0 == strcmp(mcount, symname) || |
282 | symname)) | 283 | (altmcount && 0 == strcmp(altmcount, symname))) |
283 | mcountsym = Elf_r_sym(relp); | 284 | mcountsym = Elf_r_sym(relp); |
284 | } | 285 | } |
285 | 286 | ||