]> git.baikalelectronics.ru Git - kernel.git/commit
ftrace: handle weak symbol functions
authorSteven Rostedt <rostedt@goodmis.org>
Wed, 20 Aug 2008 14:07:35 +0000 (10:07 -0400)
committerIngo Molnar <mingo@elte.hu>
Tue, 14 Oct 2008 08:36:00 +0000 (10:36 +0200)
commitad308148d0d38926b7f00a0a2c655da2353e32f2
treeb8670f1cd683039263f6f1f98962c8a6ed4d6ad6
parent4aca7cb837635439902bf6a4479345e3291694a8
ftrace: handle weak symbol functions

During tests and checks, I've discovered that there were failures to
convert mcount callers into nops. Looking deeper into these failures,
code that was attempted to be changed was not an mcount caller.
The current code only updates if the code being changed is what it expects,
but I still investigate any time there is a failure.

What was happening is that a weak symbol was being used as a reference
for other mcount callers. That weak symbol was also referenced elsewhere
so the offsets were using the strong symbol and not the function symbol
that it was referenced from.

This patch changes the setting up of the mcount_loc section to search
for a global function that is not weak. It will pick a local over a weak
but if only a weak is found in a section, a warning is printed and the
mcount location is not recorded (just to be safe).

Signed-off-by: Steven Rostedt <srostedt@redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
scripts/recordmcount.pl