ftrace/MIPS: Add MIPS64 support for C version of recordmcount
authorJohn Reiser <jreiser@BitWagon.com>
Wed, 27 Oct 2010 10:59:07 +0000 (18:59 +0800)
committerRalf Baechle <ralf@linux-mips.org>
Fri, 29 Oct 2010 18:08:54 +0000 (19:08 +0100)
commita2d49358ba9bc93204dc001d5568c5bdb299b77d
treea9f70362c6aba75f56ad4a808473ae961cff957b
parent949e51bea342da838be5295628e4a7ada8bae833
ftrace/MIPS: Add MIPS64 support for C version of recordmcount

MIPS64 has 'weird' Elf64_Rel.r_info[1,2], which must be used instead of
the generic Elf64_Rel.r_info, otherwise, the C version of recordmcount
will not work for "segmentation fault".

Usage of "union mips_r_info" and the functions MIPS64_r_sym() and
MIPS64_r_info() written by Maciej W. Rozycki <macro@linux-mips.org>

----
[1] http://techpubs.sgi.com/library/manuals/4000/007-4658-001/pdf/007-4658-001.pdf
[2] arch/mips/include/asm/module.h

Tested-by: Wu Zhangjin <wuzhangjin@gmail.com>
Signed-off-by: John Reiser <jreiser@BitWagon.com>
Signed-off-by: Maciej W. Rozycki <macro@linux-mips.org>
LKML-Reference: <AANLkTinwXjLAYACUfhLYaocHD_vBbiErLN3NjwN8JqSy@mail.gmail.com>
LKML-Reference: <910dc2d5ae1ed042df4f96815fe4a433078d1c2a.1288176026.git.wuzhangjin@gmail.com>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
scripts/recordmcount.c
scripts/recordmcount.h