ftrace: Add arm64 support to recordmcount
authorAKASHI Takahiro <takahiro.akashi@linaro.org>
Wed, 30 Apr 2014 09:54:32 +0000 (18:54 +0900)
committerMark Brown <broonie@linaro.org>
Fri, 30 May 2014 17:15:42 +0000 (18:15 +0100)
commit6470430d6d73aa46e00cc28ee732b292538419c9
tree2d554713c3672e71815aa93e33f76a4c74369940
parent8370369c5c33b9d573575249f080a905323d7eb4
ftrace: Add arm64 support to recordmcount

Recordmcount utility under scripts is run, after compiling each object,
to find out all the locations of calling _mcount() and put them into
specific seciton named __mcount_loc.
Then linker collects all such information into a table in the kernel image
(between __start_mcount_loc and __stop_mcount_loc) for later use by ftrace.

This patch adds arm64 specific definitions to identify such locations.
There are two types of implementation, C and Perl. On arm64, only C version
is used to build the kernel now that CONFIG_HAVE_C_RECORDMCOUNT is on.
But Perl version is also maintained.

This patch also contains a workaround just in case where a header file,
elf.h, on host machine doesn't have definitions of EM_AARCH64 nor
R_AARCH64_ABS64. Without them, compiling C version of recordmcount will
fail.

Acked-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
arch/arm64/Kconfig
scripts/recordmcount.c
scripts/recordmcount.pl