Rabin Vincent 9905ce8ad7 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>
2011-05-25 19:56:33 -04:00
..
2011-03-31 11:26:23 -03:00
2005-04-16 15:20:36 -07:00
2011-03-31 11:26:23 -03:00
2011-03-31 11:26:23 -03:00
2010-11-25 15:49:50 +01:00
2005-04-16 15:20:36 -07:00
2011-03-31 11:26:23 -03:00
2010-03-07 21:19:09 +01:00
2010-03-07 21:22:56 +01:00
2010-10-28 00:32:23 +02:00
2008-07-25 22:12:41 +02:00
2009-06-09 22:37:54 +02:00
2011-03-31 11:26:23 -03:00
2010-03-23 12:26:38 +01:00
2011-03-31 11:26:23 -03:00
2008-04-25 20:18:48 +02:00
2011-03-31 11:26:23 -03:00
2010-08-17 11:47:40 +02:00
2005-04-16 15:20:36 -07:00
2009-06-09 22:37:54 +02:00