Re: [PATCH] ftrace: handle weak symbol functions

From: Ingo Molnar
Date: Wed Aug 20 2008 - 10:51:33 EST



* Steven Rostedt <rostedt@xxxxxxxxxxx> wrote:

> 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@xxxxxxxxxx>

applied to tip/tracing/ftrace, thanks Steve!

Ingo
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/