summary refs log tree commit diff
path: root/kernel/jump_label.c
diff options
context:
space:
mode:
authorRabin Vincent <rabin@rab.in>2011-05-11 22:53:51 +0530
committerSteven Rostedt <rostedt@goodmis.org>2011-05-25 19:56:33 -0400
commit9905ce8ad7b79dddd23c7b4753d0b2cdb65bde3c (patch)
tree72f06d11cf99b20d7e91a1bb65be8a7f20756c65 /kernel/jump_label.c
parent4d7a2fa876d1a615649761dc465708d0a062249a (diff)
downloadlinux-9905ce8ad7b79dddd23c7b4753d0b2cdb65bde3c.tar.gz
ftrace/recordmcount: Avoid STT_FUNC symbols as base on ARM
While find_secsym_ndx often finds the unamed local STT_SECTION, if a
section has only one function in it, the ARM toolchain generates the
STT_FUNC symbol before the STT_SECTION, and recordmcount finds this
instead.

This is problematic on ARM because in ARM ELFs, "if a [STT_FUNC] symbol
addresses a Thumb instruction, its value is the address of the
instruction with bit zero set (in a relocatable object, the section
offset with bit zero set)".  This leads to incorrect mcount addresses
being recorded.

Fix this by not using STT_FUNC symbols as the base on ARM.

Signed-off-by: Rabin Vincent <rabin@rab.in>
Link: http://lkml.kernel.org/r/1305134631-31617-1-git-send-email-rabin@rab.in
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Diffstat (limited to 'kernel/jump_label.c')
0 files changed, 0 insertions, 0 deletions