Re: drivers/staging/meilhaus build broken with ftrace

From: Steven Rostedt
Date: Thu Aug 06 2009 - 18:51:34 EST


On Thu, 6 Aug 2009, Steven Rostedt wrote:
> Yes the module did something funky, but what broke recordmcount.pl was not
> something that is not allowed. The code broke because a weak function was
> the only function in a section. This patch keeps it from crashing.
>
> Hmm, maybe I should make it warn, because a weak function by itself in a
> section will not be traced.

Now the question is, is this a crucial enough change to push for 31, or
should we leave this for 32?

This patch is small enough for 31, but to add a warning would require a
little more code rework. I can queue this up for 31 and then have the
warning ready for 32.

-- Steve
>
> diff --git a/scripts/recordmcount.pl b/scripts/recordmcount.pl
> index d29baa2..979da4b 100755
> --- a/scripts/recordmcount.pl
> +++ b/scripts/recordmcount.pl
> @@ -393,7 +393,7 @@ while (<IN>) {
> $read_function = 0;
> }
> # print out any recorded offsets
> - update_funcs() if ($text_found);
> + update_funcs() if (defined($ref_func));
>
> # reset all markers and arrays
> $text_found = 0;
> @@ -441,7 +441,7 @@ while (<IN>) {
> }
>
> # dump out anymore offsets that may have been found
> -update_funcs() if ($text_found);
> +update_funcs() if (defined($ref_func));
>
> # If we did not find any mcount callers, we are done (do nothing).
> if (!$opened) {
>
--
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/