From ed60453fa8f8fc3d034dfdf10371a99cc6905626 Mon Sep 17 00:00:00 2001 From: Rabin Vincent Date: Tue, 30 Nov 2010 17:36:48 +0100 Subject: 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 Signed-off-by: Rabin Vincent Signed-off-by: Russell King --- scripts/recordmcount.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'scripts/recordmcount.h') diff --git a/scripts/recordmcount.h b/scripts/recordmcount.h index 58e933a2054..8087bc8cd2d 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); } -- cgit v1.2.3