Skip to content
Snippets Groups Projects
Commit 9905ce8a authored by Rabin Vincent's avatar Rabin Vincent Committed by Steven Rostedt
Browse files

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: default avatarRabin Vincent <rabin@rab.in>
Link: http://lkml.kernel.org/r/1305134631-31617-1-git-send-email-rabin@rab.in


Signed-off-by: default avatarSteven Rostedt <rostedt@goodmis.org>
parent 4d7a2fa8
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment